Lab #1 (A very simple computer application program)

 

 

(i) Download this zip file of a sample project and extract it to get a sampleProject folder. Open the folder and you’ll see the file myProgram.sln, which defines a programming project for the very simple C++ program in Reading #1. You’ll also see a myProgram subfolder, which contains the C++ source code file created for the very simple C++ program in Reading #1 in it.

(ii) In the sampleProject folder, double click myProgram.sln to open the Microsoft C++ programming project.

(iii) From the menu bar select Debug à Start debugging to compile the program. Visual C++ should be able to compile and run the program without error messages if the installation of the Visual C++ has been done properly.

(iv) Exit the Microsoft C++ programming project. Go to the sampleProject folder again and find a myProgram folder in it. Open the myProgram folder to find main.cpp file in it. This is the source code file main.cpp containing the simple C++ program.   Go to the sampleProject folder again and find a Debug folder in it. Open the Debug folder and double click a myProgram application program (it is actually myProgram.exe) in it. This is the executable compiled from the source code file main.cpp by the Microsoft C++ programming environment. The end users typically run the executable directly as application software without the original source code written by the programmers. For example, you can download and play with the sample 2D game executables here by previous CSCI 105 students.

 

Based on Part I, Reading #1, and your understanding of the very simple sample program above, try to modify the simple sample C++ program so that it will ask the user to provide a distance in inches, covert that into a distance in cm, and inform the user of the result. Keep the revised project folder with you and we will help you compile and run your program during the meeting next week in the class. Note that this is not a programming assignment.