Skip to content
Solved Assignments

COMP122 Week 1 iLab - Introduction to Visual C++.NET and Basic Console Programming

Instructions for a week 1 iLab focusing on Visual C++.NET and basic console programming.

Preview 7 of 20 pages

See the first 7 pages exactly as they appear in the document.

  1. Page 1
    Read page 1 as text

    1 COMP122 Week 1 iLab - Introduction to Visual C++.NET and Basic Console Programming Explain the steps to create, compile, and run a C++ console - mode project in Visual C++.NET (2010), including how to handle common syntax errors and warnings. Additionally, describe the importance of creating a test plan for verifying the program’s correctness and how to compare predicted and actual outputs to identify logical errors. Word Count Requirement: 300 - 400 words

  2. Page 2
  3. Page 3
    Read page 3 as text

    2 COMP122 : Week 1 iLab - Part 1 Introduction to Visual C++.NET (20 10 ) IDE Objectives After completing this assignment , you should : • be able to create an empty c onsole - mode project in VC++.NET; • know how to enter, compile, build , and run a C++ console - mode program; • know some basic components of a C++ program , such as #include<iostream> ; using namespace std; ; int main( ) ; return 0; ; opening and closing braces, { and }; and the int data type; • be able to use cin and cout . for simple te xt and numeric input and output; • be able to use basic integer arithmeti c operations, including modulus; • know that integer division truncates; • understand how the compiler reacts to several common syntax errors; • understand the process of developing a test plan, including predicted output f or specific inputs (test cases); • know how a pro gram reacts to division by zero; • know where the .exe file is stored after a successful build; and • know how to keep the Command Prompt window open at the end of a console - mode program. C++ Console - Mode Program Development Procedure Visual C++ is an IDE (Integrated Development Environment) for writing programs in C++. The object of this laboratory is to introduce you to the basic features of an IDE (source - code entry and editing, compiling, linking, and execution) and some basic C++ programming statements to do some mathematical operations and simple input/output. WARNING: Accurate typing is the key to success here. Although the compiler is tolerant of extra "white space" (spaces, tabs , and blank lines), it is very fussy about other syntax (punctuation, keywords, variable names, upper and lower case requirements, etc.), so be sure to type in the program below exactly as written, including case . In addition to showing how to create and run a program in VC++.NET, this exercise discusses how to test a program, which involves selecting test inputs and predicting what output the program should generate , then observing the actual output, comparing the two , and analyzing any differences.

  4. Page 4
    Read page 4 as text

    3 Open Visual C++ .NET Open Microsoft Visual C++ 20 10 .NET by double - clicking on its icon . Figure 1 : When you open Visual C++ .NET , it should look similar to this image . You may find it convenient to maximize this screen if it is not already maximized. To set up your project, either select File - > New - > Project from the menu , or click on New Project in the upper - left part of the window . In the New Project window that is displayed, select Visual C++ - Win32 as the template on the left - hand side of this window. On the right - hand side of this window, select Win32 Console Application . ( NOTE : There are different project types, so be sure to select the correct one, Win32 Console Application ) . On the Name line, enter the name of this project, e.g. Lab01 . In

  5. Page 5
    Read page 5 as text

    4 the Location line, enter the directory where you want your project to be stored. Your screen should look like the following: NOTE : If the Start Page ( Figure 1 ) does not appear , click the Help menu and select Show Start Page . Figure 2: New Project Window

  6. Page 6
    Read page 6 as text

    5 Click OK . If you see a pop - up window indicating that your project location cannot be fully trusted, click OK . Next, the Win32 Application Wizard window appears. It looks like the following: Figure 3: I nitial Win32 Application Wizard W indow

  7. Page 7
    Read page 7 as text

    6 Click the Application Settings on the left - hand side of the Win32 Application Wizard window. The Application type should already be Console application (select it if not), then , under Additional options , select Empty project . The window should look like Figure 4 . Figure 4: Applications Settings W indow of the Win32 Application Wizard

13 more pages in the full document

Unlock it once and it stays in your library, ready to chat with or turn into flashcards.

Unlock the full document
See all

Study this document with CramX

Once it is in your library, every tool can work from it.