Log into the computer science server and use
your starter code.
wget to download the file at http://cs.longwood.edu/courses/cmsc160/f17/files/lab3.tgz
- Uncompress the lab3.tgz file by using
tar -xvzf lab3.tgz
ls to see that there is a new directory called lab3
cd lab3 to change directory to the lab3 directory
We can create new files and directories but sometimes we need to move or delete our files.
rm filename permanently removes (deletes) the file
cp oldname newname copies the file at oldname to a new file at newname.
mv oldname newname moves the file from oldname to the file newname. Note this does not copy, can overwrite files and removes the original file!
Each of these commands has additional options, you can find out more about linux commands by reading the man pages found using the
program. Try out
to see all of the options.
Write the code for a program that prompts for three double numbers
and prints out the max, min, median, and average.
In this lab we will:
- write test cases
- write a README
- practice using conditions
Remember, you will be graded on style, syntax, functionality, test cases, and correctness.
An Example README.txt:
Lab3: Three Numbers
Author: Julian Dymacek
Date: 2017 Sept. 5
A program to compute statistics about three decimal numbers.
1 3 5
median is 3.0
max is 3.0
min is 1.0
average is 3.0
You should start by creating test cases. What are possible tricky conditions that you should test? Next think about what data you will need to store. What kind of information do you need to output?
When you are done you may hand in your lab by using
The lab is due at 11:59pm Sept. 12th 2017.