wgetwhich takes a url (web address) and will download the file at that address. Another useful program called
tarcombines and compresses (or decompresses) files.
wget addressdownloads the file at the address and saves it to the current directory
tar -xvzf filenamewill extract a compressed tar file (called a tarball)
wgetto download the file at http://cs.longwood.edu/courses/cmsc160/f17/files/lab2.tgz
tar -xvzf lab2.tgz
lsto see that there is a new directory called lab2
cd lab2to change directory to the lab2 directory
README.txtfile with any program you write. Your
README.txtfile should include your name, the date, the project (or lab), a description of the project, instructions on how to compile, instructions on how to run, and any test cases.
You should first write test cases. What values would make good test cases? Write your test cases (along with the correct solution) in your README file.
I would recommend getting your program to first work with an integer number of minutes.
Build a C++ program to solve the problem. Start by editing the lab2.cpp file. You will need to utilize the new input variable
cin and format your output to make it readable. Don't forget that you will need comments!
Compiling often can make sure a silly mistake doesn't become more difficult to find.
Test your program using your test cases. If you don't get the correct (expected) answers try to understand what went wrong. Make small changes (hopefully fixes!), recompile and try your test case again. If you are absolutely stuck see me or the tutor.
When you are done you need to hand in your lab. The easiest way is to type
If you have changed file names or directory names you will need to change to the
directory which contains the directory you wish to hand in. We will use
handin cmsc160-1 assignment directory command.
In this case you will type:
handin cmsc160-1 lab2 lab2
You lab is due at 11:59pm Sept. 5th 2017.