Before Submitting Any Program:
- Strive to finish at least one day in advance of the deadline. This will allow time for you to come for help when the inevitable issues occur.
- Always compile and execute one final time. Programs must compile to receive any credit.
- Ensure that your program executes correctly, producing correct output.
- Ensure that your program has plenty of comments, including a block comment at the top with name, date, and program purpose; block comments prior to each method, and inline comments. Insufficient comments will not earn full points.
- Ensure that you have consistent and proper indentation.
- Ensure that you have generous use of whitespace.
- Give the user meaningful usage/error messages.
For example,
"Incorrect number of files."
is not very helpful."Usage: ./problem1 [input text filename] [output text filename]"
is clear and helpful.
Follow specifications carefully and precisely. This will require you to read the assignment carefully.
When I mention example programs in the specifications, it is in your best interests to go investigate those programs, rather than just rely on something you might find on stackoverflow. For example, there is an approach I want you to use for reading from files, which will be available in a provided example program. Follow that as a guide.
Supplementary Readings/Tutorials/How-To's
- C++ Super-FAQ
- C++ Reference
- Coding Standards [pdf] (Dr. Kelly Shaw)
- Mac Unix Tutorial for Beginners
- GDB HowTo (Dr. Tia Newhall)
- Vim Quick Reference Card [pdf]
- Using SSH (machines available in S2020: mathcs{01-06}, turing2)
Online Books
-
(You may need to register here)
- C++ Primer Plus (Prata)
- A Tour of C++ (Stroustrup)
- The C++ Programming Language (Stroustrup, 4th ed.)
- Head First Object-Oriented Analysis & Design (McLaughlin et al.)
- Head First Design Patterns (Sierra et al.)
General Related Info
Secure-copy instructions:
Secure copy from Linux network to local machine:
Possible Remote-Linux Workflow:
- Mac: Install XCode + Command-Line Tools
- Windows: Install Linux Subsystem, Atom, g++
- UR's Virtual Private Network (VPN) and Duo software
- To display X11 windows from Linux on your local machine (may be slow):
- Mac: XQuartz
- Linux subsystem for Windows: (see instructions linked above...)
- To launch entire Linux-desktop window on your local machine (likely faster than above):
- open a terminal
- ssh to one of the mathcs or turing machines (see below)
- execute:
xwinrhel7.sh
- Secure-shell instructions:
- To ssh to one of the mathcs machines (01, 02, ..., 06):
ssh -Y ab2cd@mathcs03
- To ssh to one of the mathcs machines (01, 02, ..., 06):
- To ssh to turing2:
ssh -Y ab2cd@turing2
- (Either direction of scp below should be executed from your local machine, not while ssh'd into the Linux network)
- Secure copy from local machine to Linux network:
- one file:
scp myprog.cpp ab2cd@mathcs03:~/cmsc240/prog1/
- directory:
scp -r prog1/ ab2cd@mathcs03:~/cmsc240/
- one file:
scp ab2cd@mathcs03:~/cmsc240/prog1/myprog.cpp .
- directory:
scp -r ab2cd@mathcs03:~/cmsc240/prog1/ .
- Open one terminal, maintained on your local machine
- Open another terminal, and
ssh
into mathcs{01-06} or turing2 - Edit programs locally using Atom/Sublime/etc. on your machine
- For convenience, compile and test locally before pushing to remote machine
- From local terminal,
scp
your program(s) to mathcs{01-06} or turing2 - From remote-ssh terminal, compile and execute your programs remotely