1 Lab Session-I CSIT120 Spring2001 Using Windows Using An Editor Using Visual C++ Using Compiler Writing and Running Programs Lab-1 continues (Session.

Slides:



Advertisements
Similar presentations
Introduction to Programming Java Lab 1: My First Program 11 January JavaLab1.ppt Ping Brennan
Advertisements

Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Windows XP Basics OVERVIEW Next.
Introduction to C++ Programming. A Simple Program: Print a Line of Text // My First C++ Program #include int main( ) { cout
1 Lab Session-II CSIT 121 Fall 2000 Visual Studio Introduction Lab-1 Explanation and Demos Debugging Tips How to add new files to your projects How many.
Your First C++ Program Aug 27, /27/08 CS 150 Introduction to Computer Science I C++  Based on the C programming language  One of today’s most.
1 Lab-1 CSIT-121 Spring 2005 Lab Targets Solving problems on computer Programming in C++ Writing and Running Programs Programming Exercise.
1 Session-I & II CSIT-121 Spring 2006 Session Targets Introducing the VC++.NET Solving problems on computer Programming in C++ Writing and Running Programs.
1 Lab Session-I (A and B) CS-120 Fall 2000 Using Windows Using An Editor Using Visual C++ Using Compiler Writing and Running Programs Lab-1 DUE Fri September.
01 Introduction1June Introduction CE : Fundamental Programming Techniques.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 Lab-1 CSIT-121 Fall 2004 Lab Targets Solving problems on computer Programming in C++ Writing and Running Programs Programming Exercise.
A Visual Introduction to PC SAS. Start SAS by double-clicking on the SAS icon...
1 Session-4 CSIT 121 Spring 2006 Debugging Tips Lab Work.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Pasewark & Pasewark Microsoft Office XP: Introductory Course 1 INTRODUCTORY MICROSOFT WORD Lesson 7 – Working With Documents.
MBAC 611.  We have been using MS Access to query and modify our databases.  MS Access provides a GUI (Graphical User Interface) that hides much of the.
Introduction to R Statistical Software Anthony (Tony) R. Olsen USEPA ORD NHEERL Western Ecology Division Corvallis, OR (541)
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter One An Introduction to Visual Basic 2010.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
Lecture 1: Introduction Lecture series based on the text: Essential MATLAB for Engineers and Scientists By Hahn & Valentine
A First Program Using C#
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Hello World In C++ and Microsoft Visual C++. Directions to begin a project 1. Go to All Programs 2. Open Visual Studio C++ 3. Click on New Project 4.
Microsoft Visual Basic 2005: Reloaded Second Edition
The NetBeans IDE CSIS 3701: Advanced Object Oriented Programming.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Introduction to the WebBoard Terry Dennis. The WebBoard - Our Connection The WebBoard URL is
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
A1 Visual C++.NET Intro Programming in C++ Computer Science Dept Va Tech August, 2002 © Barnette ND & McQuain WD 1 Quick Introduction The following.
CPS120: Introduction to Computer Science Compiling Your Programs Using Visual C++
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files.
1 Special Programming Workshop CSIT-120 Fall 2000 Workshop Targets Solving problems on computer Programming in C++ Writing and Running Programs Programming.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Comments in Java. When you create a New Project in NetBeans, you'll notice that some text is greyed out, with lots of slashes and asterisks:
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
GISMO/GEBndPlan Overview Geographic Information System Mapping Object.
Chapter 2 part #1 C++ Program Structure
1 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
C++ LANGUAGE TUTORIAL LESSON 1 –WRITING YOUR FIRST PROGRAM.
Lab00-Getting Started with VC Launch VS 2005 Launch Visual Studio 2005 – Start > All Programs > Microsoft Visual Studio 2005 > Microsoft Visual.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
Standard Toolbar Formatting Toolbar Paragraph Indent Markers Formatting Font Style And Font Size Setting Indents Paragraph alignment Paragraph And Line.
Introduction to Eclipse Programming with an Integrated Development Environment.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
>>0 >>1 >> 2 >> 3 >> 4 >>
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Chapter 1: Introduction to Computers and Programming.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
This is an introduction to configuring Microsoft Outlook for Office 2010: Forwarding FAMIS work order opening and closing s to other users or alternate.
The eclipse IDE IDE = “Integrated Development Environment”
Development Environment
Chapter 2: The Visual Studio .NET Development Environment
RAD Certification Checkpoint #2 Introducing RadStudio (Hello World)
1. Introduction to Visual Basic
Chapter 1: Introduction to SAS
Hands-on Introduction to Visual Basic .NET
CIS16 Application Development Programming with Visual Basic
How to Run a Java Program
How to Run a Java Program
Programming Fundamentals Lecture #3 Overview of Computer Programming
Running a Java Program using Blue Jay.
Presentation transcript:

1 Lab Session-I CSIT120 Spring2001 Using Windows Using An Editor Using Visual C++ Using Compiler Writing and Running Programs Lab-1 continues (Session I-B)

2 Lab Targets We wish to learn how to program We would like to edit a program, compile it and run it successfully Therefore we need to learn editing, compiling and running programs This can be done under MS-Windows operating system easily

3 Using Windows MS-Windows is a user friendly system Mouse clicks in GUI environment make it easy to use the system. Switching from one task to another is done through various ways Cutting and pasting from one application to another is convenient way to share data

4 Using an Editor First, we should learn basic editing under Windows operating system We need to know how to correct a mistake, cut and paste text and save a file Let us do some practice sessions as prescribed in the manual. Please do experiment 1.1 in lab session 1 Pages 3-4

5 Suggested Editors Under Ms-Windows, Wordpad and Notepad are available as editors that can handle text files Wordpad is better than Notepad as it remembers previously edited files Please save the file as “Text file--MS-DOS format” if you wish to give it an extension of.cpp (C++ source code file) or save as “all files” under Notepad

6 Using Visual C++ Visual C++ is part of MS Visual Studio package Visual C++ is easy to use because of its integrated development environment It implements the C++ programming language and offers many choices for structured or object-oriented programming

7 Visual Studio Introduction Visual Studio is a suite of programming tools from Microsoft. C++ is a part of this suite. Launch Visual C++from Start->Programs- >Visual Studio x.x->Microsoft Visual C++ The screen will be divided into three areas The large grey window to the right is the work area

8 Visual Studio Introduction The narrower window to the left is the workspace window and the bottom window is the output window You can control the appearance of your screen by right clicking and then selecting or de-selecting various windows We will be developing console projects in our work, starting with single C++ files

9 Using A Compiler We will be using Visual C++ for this course as our programming environment Visual C++ can be started from the Start button Go to “file==>new==>files==>C++Source File” to start editing a new source code file. Visual C++ provides its own editor Perform Experiment 1.2 in session1 Pages 4-6 of lab manual

10 Using A Compiler Please save your file once you are done editing it. The default name of your file would be Cpp1.cpp. Change it if you do not like this name. Now go to menu options “Build==>Build” It will ask you some funny question(s), say “Yes” to all Once built, the project can be executed from “Build==>Execute” or “!” icon

11 The Anatomy of a C++ Program Let us explore the structure of the C++ program that we have compiled and executed. The program began with comments line. All comments start with “//” or “/*”. Comments do not contribute anything in the program. Comments are for readers to understand the program later.

12 The Anatomy of a C++ Program You are expected to put comments at all important places so anyone else can read and understand your source code The line with –#include is a directive to include a “header” file. Header files contain names of the functions to be used by the program.

13 The Anatomy of a C++ Program C++ provides a lot of built-in functions so that programmers do not have to re-invent the wheel For example, displaying something on screen is a task. Everyone is not supposed to develop a program to do it C++ developers have already written a “program” to do it. All you need to do is to use it appropriately

14 The Anatomy of a C++ Program cout<< is the way to display your data on the screen (Think of directing output to the screen) Next we see the line –void main(void) This line gives the name of the function that you are developing. main() is the default name used for the main function of any program

15 The Anatomy of a C++ Program Function is a block of code that performs a given task. A function carries a name and opening and closing braces If there is only one function in your program, it must be named main().

16 The Anatomy of a C++ Program The function main is started with an opening brace { and terminated with a closing one } These braces identify the start and end of a block of code. e.g. a function We will identify some more uses of these braces in future

17 Lab Demo Due In-Class Please perform Experiment 1.4 and 1.5 and give the report to the Teaching Assistant

18 Lab-1 Continues (Session I-B) We have learned –How to use a text editor in Windows –How to use Visual C++ –How to compile, build and run programs in Visual C++ We should strengthen our knowledge by doing some more examples

19 Q&A Why is included in the program source code? Why do we name the only function in our program as main()? What is the use of opening braces and closing braces in the program? What is a header file? What is cout<<? Why do we put semicolons at the end of each statement?

20 Lab Experiments We can introduce errors in our source code and then check the compiler error messages Perform Experiment 1.3 on page 8 of lab manual session-1

21 Lab Experiments The little character “\n” inserts a newline in the display. We can use it whenever we want the next item to begin on a new line Text to be displayed is surrounded by double quotes in the cout statement. However double quotes are not shown when program is executed Perform Experiment 1.6 to learn the rules about placing quotation marks in the text.

22 Practicing ASCII Art Right now we have the expertise of using the output statement cout in displaying text We can use this expertise to display several different things. For example, let us show a triangle with this statement Can you write a program to show a triangle or a square, or an automobile with cout?