CS 12 - Lab 1
In this lab you will learn the basics that are necessary to complete and
electronically submit assignments in this class. Many of you already know
most of this material, but it will be a good review. You will practice basic
MS-Windows commands, then write and submit a short C++ program.
You should perform and understand the following tasks before leaving this lab.
Be sure to ask the TA if you have any questions. There is also a very good
web page made by another instructor called "The Basics" which can answer
many questions you might have. Click
here
to view it.
- Make sure the computer is booted to MS-Windows and log in.
(Your TA will give you your class account).
- Perform basic operations in Windows:
- Create folders (directories).
- Rename files or folders.
- Move/Copy files or folders within your account.
- Delete files or folders. This is important because before submitting
an assignment electronically, you are required to delete all
unnecessary files from the submitted folder. Failure to do so
will result in points being marked off. You should only submit
the files you actually wrote (.cpp files).
- Send e-mail. This is important if you need to contact the instructor or
TA outside of class.
- Use Visual C++ to write, compile, and run a program.
- Electronically submit your program.
In order to get the points for this lab, you must demonstrate to the TA that
you have performed the tasks listed above. Specifically, you must:
- Send your TA e-mail (during your lab time) containing the following
information: Name, SSN, login, and lab section number.
- Create a folder called lab1. The C++ program you will write
and submit (in the next two steps) should be stored in this folder.
- Write a simple C++ program that prompts the user to enter any number
of positive floating point values, then prints out the largest value,
the smallest value, and the average of the values, each rounded to 2
decimal places. The user indicates s/he is finished entering values
by entering 0 or a negative number. Do not use an array to
store the numbers. Run the program in front of the TA.
- Electronically submit your program in the lab1 folder. Click
here to go to
the electronic submission web page and click on the WWWTurnin
link. Make sure the folder you submit contains only your .cpp file.
Once you have performed the submit and you see the "Successful Turn In"
message, make sure your .cpp file is listed. Simply seeing
"Successful Turn In" is not enough. It can be a lie! Make sure
your .cpp file is listed underneath. If it is not, your .cpp file is
not within the folder you submitted. Show the TA the
"Successful Turn In" message.
Following is a sample run of the program you should write:
This program will print the maximum, minimum, and average value from a list
of numbers you submit.
Please enter a positive number (or 0 to quit): 75.5
Please enter a positive number (or 0 to quit): 24.5
Please enter a positive number (or 0 to quit): 50
Please enter a positive number (or 0 to quit): -2
The maximum value entered was: 75.50
The minimum value entered was: 24.50
The average of the values is : 50.00