wget
which takes a url (web address) and will download the file at that address. Another useful program called tar
combines and compresses (or decompresses) files.
wget address
downloads the file at the address and saves it to the current directory
tar -xvzf filename
will extract a compressed tar file (called a tarball)
wget
to download the file at http://cs.longwood.edu/courses/cmsc160/f17/files/lab2.tgz
tar -xvzf lab2.tgz
ls
to see that there is a new directory called lab2
cd lab2
to change directory to the lab2 directory
README.txt
file with any
program you write. Your README.txt
file 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.
Lab2: Time Author: Julian Dymacek Date: 2017 Aug. 29 A program to convert minutes into other time units. Will only work with non-negative numbers. To compile: make To run: ./lab2 To test: type in 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 make handin
.
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
the 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.