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.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

 Use the Left and Right arrow keys or the Page Up and Page Down keys to move between the pages. You can also click on the pages to move forward.  To.
COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
Lecture Roger Sutton CO331 Visual programming 15: Debugging 1.
1 Session-5 CSIT 121 Spring 2006 Part D due now String Rules Chapter 2 Topics Lab Demo Exercise Assignment.
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.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
1 Lab Session-2 CSIT 121 Spring 2005 Debugging Tips NiMo’s Varying Rates Lab-2 Exercise.
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.
1 Lab Session-I CSIT120 Spring2001 Using Windows Using An Editor Using Visual C++ Using Compiler Writing and Running Programs Lab-1 continues (Session.
Guidelines for working with Microsoft Visual Studio.Net.
1 Lab Session-VII CSIT-121 Fall Revising Previous Lab and performing ASCII chart printing experiment (DEMO) 4 Visual Studio Features 4 The While.
Guidelines for working with Microsoft Visual Studio 6.
LAUNCHXL2-RM57L – Project 0
CS 2511 Fall  Windows:  Start->Specialized Academic Software- >Programming Languages->NetBeans->NetBeans IDE x.y.z  where x.y.z is a version.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 Session-4 CSIT 121 Spring 2006 Debugging Tips Lab Work.
1 Gentle Introduction to Programming Tirgul 2: Scala “hands on” in the lab.
JavaScript Development Tools Front-End Development.
Debugging Logic Errors CPS120 Introduction to Computer Science Lecture 6.
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering.
Lecture 1: Introduction Lecture series based on the text: Essential MATLAB for Engineers and Scientists By Hahn & Valentine
Using a Debugger. SWC What is ”debugging”? An error in a computer program is often called a ”bug”… …so, to ”debug” is to find and get rid of errors in.
WaveMaker Visual AJAX Studio 4.0 Training Troubleshooting.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Keith Elder Microsoft MVP
Intro to C++. Getting Started with Microsoft Visual Studios Open Microsoft Visual Studios 2010 Click on file Click on New Project Choose Visual C++ on.
A1 Visual C++.NET Intro Programming in C++ Computer Science Dept Va Tech August, 2002 © Barnette ND & McQuain WD 1 Quick Introduction The following.
Selecting, Formatting, and Printing a finished Report…….
Lecture 6: Computer Languages. Programming Environments (IDE) COS120 Software Development Using C++ AUBG, COS dept.
Our Environment We will exercise on Microsoft Visual C++ v.6 We will exercise on Microsoft Visual C++ v.6 because that is what we have in the univ. because.
Programming with Visual C++ A short review of the process.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
CSE 232: C++ Programming in Visual Studio Graphical Development Environments for C++ Eclipse –Widely available open-source debugging environment Available.
Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource:
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
CS Class 05 Topics  Selection: switch statement Announcements  Read pages 74-83, ,
Debugging Visual Basic.NET Programs ► ► Use debugging tools ► ► Set breakpoints and correct mistakes. ► ► Use a Watch and Local window to examine variables.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
1 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
CS320n –Visual Programming More LabVIEW Foundations.
1 Debugging and Syntax Errors in C++. 2 Debugging – a process of finding and fixing bugs (errors or mistakes) in a computer program.
Lab00-Getting Started with VC Launch VS 2005 Launch Visual Studio 2005 – Start > All Programs > Microsoft Visual Studio 2005 > Microsoft Visual.
This is how you invoke the Microsoft Visual Studio 2010 Software. All Programs >> Microsoft Visual Studio 2010.
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.
Open project in Microsoft Visual Studio → build program in “Release” mode.
Debug in Visual Studio Windows Development Fundamentals LESSON 2.5A.
CSC 1201 LAB RULES Nouf Aljaffan (C) CSC 1201 Course at KSU.
Introduction to Programming Python Lab 2: Variables 15 January PythonLab2 lecture slides.ppt Ping Brennan
An introduction to the debugger And jGrasp editor-syncrasies (ideosyncrasies)
Netbeans QuickStart. Creating a project File->New Project –For now you want General->Java Application –Then fill in the project details.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 Project 12: Cars from File. This is an extension of Project 11, Car Class You may use the posted solution for Project 11 as a starting point for this.
Development Environment
Chapter 2: The Visual Studio .NET Development Environment
Eclipse Navigation & Usage.
Computer Programming I
Using Visual Studio with C#
5.01 Understand Different Types of Programming Errors
Lecture 1: Introduction
1. Open Visual Studio 2008.
Starting a project in VisualDSP++
Our Environment We will exercise on Microsoft Visual C++ v.6
Double click Microsoft Visual Studio 2010 on the Computer Desktop
POS 408 Week 1 Individual Assignment Individual: Console Display Message//tutorfortune.com Click on below link to buy
Learning the Basics of Microsoft Word 2010 for Microsoft Windows
ECE 3567 Microcontrollers Lab
Presentation transcript:

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 files are created for your project? Lab Exercises

2 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

3 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

4 NiMo’s varying rates Example: Niagara Mohawk wants to apply different rates to its customers. If the customer burns more than 1000 units in a month, rate B is applied else rate A is applied. You need to develop a software function that can give the total charges as output given a customer’s consumption.

5 NiMo’s varying rates You develop the data model for this problem What is the input to your function? Answer: consumption, A, B What is the output? Answer: charges What formula to be used? Answer (A or B)*consumption

6 Top Down Design If you are given a complex problem, you are better off dividing it into sub-problems Target is to let each sub-problem deal with one aspect of the software Thus you can rapidly develop the software to solve complex problems

7 NiMo’s varying rates In our example, the program can be divided into three sections: Answer: Input, processing, output Write a code segment to get the rates Write a code segment to process the charges Write a code segment to output the charges

8 Lab-1 Assignment Due Sep 5th Finish the NiMo varying rates program and test it with two sample customers. One customer will have rate A applied and the other one will have rate B applied to the monthly bill. Demo due TODAY. No need to submit a printout if the demo is given in the lab today

9 Some Aspects of Visual Studio Your project can be set in “Debug” or “Release” states ( Build->Set Active Configuration ) In “Debug” state, you can apply several debugging options. Debug is set by default You can start debugging by invoking the debugger

10 Debugging Tips Let us try a few simple steps Open your source file, make a mistake and try to recompile it (demo) The compiler gives an error message Click on the error message The compiler takes you to the line where the error is, press F1 to learn more

11 Starting the Debugger Once you have compiled the project, you can start the debugger by first inserting breakpoints A Breakpoint is where the program execution will halt Thus you can see the values of various variables at that point

12 Using the Debugger Inserting breakpoints is very convenient way of stopping at suspected problem location and examining the values of variables (Click the “hand” in the corner) Using “GO” causes the debugger to run the program until the next break point (Click on “Build”--> “Start Debug”-->GO)

13 Adding New Files to Your Project You can add new files to your project once you have compiled and tested your first file The way to do it is to create a new C++ source file and save it as part of your project If you define a new function in the new file, you must declare it before using it

14 How many files? Use Explorer or winfile to check out all the files that Visual C++ creates for your project.exeExecutable program file.objMachine code for every source file.ilkLinker uses this file to avoid re-linking code that was not modified

15 How many files?.pchPre-compiled header file.pdbDebugging information.idbAdditional debug information

16 Lab Exercises Exercise 3 and 4 p98 of the textbook. Use your car or a friend’s car to assign values to variables declared in Exercise 3 and print these values out followed by owner’s last name and first name. (Check the source code listed on page 74 for hints). Demo is to be given in the next lab session.