|
C M S C 2 1 4 C o m p u t e r S c i e n c e II F a l l 2 0 0 4 |
Project 0 is worth 1% of your grade.
As with all projects it is extremely important to begin early. While completing this project, in addition to having a C++ reference (like the CMSC 114 text) handy, you should review the tutorials posted on the main class webpage - even if you are already familiar with UNIX it would be wise to review those tutorials as well.
There are generally a number of details contained in a project description such as this one. Please note that failure to follow the details outlined in the project description could result in a substantial loss of points so it is very important to pay close attention to the project description.
The goals of this project are to:
Please note that all programming projects in this course (including this one) are to be done independently or with the assistance of the instructional staff of this course only.
Please review the policies outlined on the class syllabus and below concerning the use of class computer accounts (Acceptable Use Guidelines) and concerning the University's Code of Academic Integrity. The instructors of this course will review all of the programs submitted by students for potential violations of the Code of Academic Integrity and if it is believed that a violation has occurred it will be referred to the Office of Judicial Programs and the Student Honor Council.
Note that "hardcoding" is also considered a violation of academic integrity.
If you are unclear about any of the policies of this course you should ask either of the instructors for further clarification. NOTE: unless explicitly specified otherwise these policies apply to all assignments in this course:
Code of Academic Integrity Guidelines for Acceptable Use of Computing Resources
All your programs in this course should be written in ANSI C++, which means they must compile and run correctly with "cxx -w0 -std strict_ansi" on the OIT UNIX Class Cluster (dc.umd.edu).
Your program must have a comment near the top which contains your name, login ID, your section number, your TA's name, an estimated time it took to complete the project (in hours) and an original description of the action and operation of the program (thus at least 6 items neatly organized and easy to read).
Your program should be written using good programming style and formatting, as discussed in class and throughout your textbook. For this project, style is considered to consist of:
Answers to "frequently asked questions" will be posted via the main projects page. Prior to asking a question or submitting a project you should check the FAQ to see if any important information has been covered there. In addition to answers to FAQ's, any important information pertaining to a project will be posted on it's FAQ.
Note that email regarding project questions will go unanswered and the means for obtaining assistance on a project is through office hours. See the course syllabus for additional information regarding these policies.
------ PART I - Logging in, setting up, and using your account ------
Note - Even if you are familiar with Unix, if you do not follow these instructions as listed it may result in your being unable to complete PART II of this assignment (and result in a loss of points on this project and possibly future projects).
Log in to your class account using ssh, putty, or some other similar remote-login program (use telnet as a last resort). You should log in (connect) to the hostname dc.umd.edu and use your class login id (fjm14xxx) and the password given. Note that if you ever have trouble logging into dc.umd.edu you can also try the following five addresses (which make up the detective cluster):
holmes.umd.edu marlowe.umd.edu marple.umd.edu tracy.umd.edu wolfe.umd.edu
Once you successfully log in a number of screens of information will appear. Continue to press 'q' (Q for quit) until you get to the UNIX prompt ( % ).
At the UNIX prompt run the dce_login command to "authenticate" your login session (this is only needed when running the setup program and/or changing your password) - be sure to use your class login ID (as the "Principle Name") and then your password. [If you use telnet the system will generally not let you complete the dce_login process - log out, log into your wam account and then "ssh" to your class account and it should then work]
After authenticating your session run the following command:
~fjm14001/setup
After running the setup program you should change your password (passwd) and then your finger information (chfn) - note that failure to change your finger information may result in loss of points on this and future projects - you should at least modify your finger information so that it reflects your real name (other information you may leave blank). Do not put your nickname down for your finger information - it should be your first and last name. Note: it may take up to 24 hours for your finger information to take effect - that is normal.
Now log out and log back in and then your account will be successfully set up and you should see the current class announcments displayed when you log in. NOTE: to log out you will need to type exit and then give the logout command (logout) - you only need to do this (type exit) this time because of the "authentication" that the dce_login command did.
After logging back in you should practice using your account a little to become familiar with the computer system. Do NOT forget to log out when you are all done. Create directories, files and other things and then delete them and reorganize them and just practice different UNIX commands.
NOTE: the setup program "installed" various things and if you fail to run the setup program then you will not be able to submit your projects. Also the setup program modified cxx to automatically use the options -std strict_ansi and -w0 (by aliasing the command). So, at the unix prompt if you wish to compile a file you just need to type cxx and then the name of the file and it will automatically include the required options (however if you use cxx in a makefile you DO have to include the options explicitly as the aliasing does not take effect inside makefiles).
------ PART II - processing a transcript file ------
For this part of the project you are required to write a program that will read an "unofficial transcript" and then output a list of all the courses taken and their grades (as specified below). You must use a singly-linked list to store the list of courses that appear in the transcript.
Note that parts of this may be similar to the project #0 used in CMSC 114 last semester however the task is quite different - granted the task is not as "useful" (in real-world terms) as the one in 114 last semester (which was to calculate the overall gpa for the transcript), however it will hopefully be more useful in "brushing off the programming dust".
It is strongly recommended that you create a new directory in your account (name it P0 or something like that) and complete the project in that directory (or a sub-directory of that one). Also you should remember to backup your file(s) on a periodic basis.
------ THE INPUT - an "unofficial transcript" ------
The input to your program will be plain text consisting of an "unofficial transcript" - this input will be redirected at the UNIX prompt into your program. Your program will NOT prompt the user for this input - instead it will assume the input is "automatically" going to be entered and will be in the correct format (described below). So for example, if there is an "unofficial transcript" in the file named sampleTrans.txt then you would run your program (assuming it is named a.out) as follows:
% a.out < sampleTrans.txt
Your program then would read (from standard input using cin or scanf) the data entered and produce the expected output (described below) to the computer screen and then end.
One or more sample transcripts is available in the posting account and you are encouraged to look at them when reviewing the following description of their format.
The input will contain a list of the semesters enrolled in school and the courses and grades earned in each of those semesters.
------ THE OUTPUT - a list of courses (ordered by grade and appearance in the input) ------
After reading in all of the input, your program should output a list of all courses taken similar to the following list:
CMSC 101 3.00 A CMSC 250 4.00 A CMSC 214 4.00 A MATH 140 4.00 B MATH 141 4.00 C CMSC 114 4.00 C ENGL 101 3.00 WIn particular one course per line must be printed and every course that appeared in the transcript must be printed out so that all courses with a grade of A appear first (in the order they are encountered in the transcript), then all courses with a grade of B (in the order encountered in the transcript), then all courses with a C (in the order ...), then all those with a D (...), then all F's, then all P's, then S's, then U's and finally all W's.
Output must appear exactly in this format with the number of credits printed out to two decimal places and one space between each part of the line.
For this project you will be provided with a primary.input and primary.output file. Both of these files can be found in the posting account in the appropriate directory. In order to pass the MRC (minimum running criteria) for this project your program must generate the primary.output when tested with the primary.input as follows:
% cxx main.cpp csll.cpp % a.out < primary.input > my.output % diff -bwi primary.output my.output %
The first line (cxx main.cpp csll.cpp) is the step to compile the project - note that you should strive to have NO COMPILER WARNINGS (points may be deducted on future projects, not this one, for having compiler warnings). ALSO NOTE: that -w0 and -std strict_ansi do not have to be done when compiling IF YOU HAVE RUN THE SETUP PROGRAM (from Part I of this project) - to see if this has been setup properly type the command alias at the UNIX prompt and if you see a line with cxx cxx -strict_ansi -w0 on it then things have been setup properly.
The second line (a.out < prima...) is a way to run the a.out program and redirect input (<) to come from the primary.input file (instead of the keyboard) and have the output redirected (>) to the file my.output (instead of the screen).
The third and final line (diff -bwi ...) is how we will test to make sure that your output (my.output) matches the expected output (primary.output). The diff command will print to the screen any lines in your file that do NOT match with the corresponding lines in the other file - if nothing gets displayed that is good news - it means that your output matches the expected output. The -bwi options tell the diff command to ignore case (be case-insensitive) and to ignore extra blank spaces. You should strive to have your output diff with the primary.output without the -bwi options, as that forces you to have a "more perfect" match - however when grading we will always use the -bwi option.
In the posting account, in the ~fjm14001/Projects/P0/ directory, there are the following files:
main.cpp course.h csll.h csll.cppYou must use these files when creating your project and you may not create any other files for this project with the exception of a course.cpp file (if you want to do so) and a makefile (again only if you want to do so) - note however that if you create a makefile, we will not use it when testing this project. If you choose to create a course.cpp file we will use it when testing your project.
When we test your project we will compile it as follows:
% cxx main.cpp csll.cppOr if you have a course.cpp file then we will compile it as follows:
% cxx main.cpp course.cpp csll.cppNote that we will be using the "aliased" version of cxx - in particular the one that uses the -w0 and -std strict_ansi options.
See the FAQ.
You may assume that the input to your program will always follow the correct format specified above.
As long as your program does not have any memory leaks and you do not store/create excessive amounts of extra unnecessary memory, then your program will NOT run out of memory during any dynamic allocations.
In general you should make no other assumptions than what is explicitly described in this project description or any files found in the corresponding directory in the posting account.
YOU MAY NOT USE "files" (or file streams) in any way and you must use the singly linked list to store the list of courses.
IT IS VERY STRONGLY RECOMMENDED THAT YOU ATTEMPT TO SUBMIT THIS (and every) PROJECT AT LEAST ONE FULL DAY (24-hours) IN ADVANCE. In particular no extensions will be granted for problems encountered in trying to get your program to submit unless there is an error that the majority of students encounter with the submit program we provide and/or the corresponding instructions. Additionally you should make a safe backup copy of all your work PRIOR to beginning the process to submit your project (as described below).
For this project (and all others) you may submit only one single file - however this poses a small problem since we need several files from you to test your code. The way around this is that you must create a tar file (in your class account) as follows:
% tar -cvf proj0.tar main.cpp csll.cpp csll.h course.hAlso if you created a course.cpp file you must include that in your tarfile and if you created a makefile you can include that as well (however it will not be used in testing your project).
WARNING - BE VERY CAREFUL USING THE UNIX TAR COMMAND - if you use the command incorrectly it may automatically DELETE (permanently) one or more of your files. Make a backup copy of your files before running the tar command. In particular the filename IMMEDIATELY after the -cvf in the tar command, must be the name of the file that you want to CREATE and put the other files into. If that file already exists it (the tar command) will automatically DELETE it and create a new one and if the file doesn't exist tar will just create a new one. To find out more about the tar command there is a "tutorial" in the posting account in the ~fjm14001/Tutorials/ directory also you can type "man tar" at the UNIX prompt to read the man page.
DO NOT EDIT YOUR TARFILE - it turns out that a tar file is a plain text file that you can read, but it may look "weird" inside - that is the way the tar file works and if you modify the tar file IT WILL NOT WORK ANYMORE and we will not be able to test your program.
After you have created the tar file you must then turn in (or submit) that file to us. The way that you do this is that you can type:
% submit proj0.tar 0at the UNIX prompt and that will run the submit program and attempt to turn in the file proj0.tar from the current directory for project #0. Note that if you did not run setup in part I above the submit command will not work - see someone in office hours if you are having trouble with this.
The submit command will generally display information to the screen and you should read that information to make sure your project submits successfully - if you do not see a message stating that your project was submitted then you should assume that it did not get submitted.
We will not accept projects submitted in any other way.
You may submit a project more than once - note however that only the last file you submit will be used for grading purposes - meaning that if you submit twice ontime and then once two days late only the last submission will be graded (the two day late version in this case). See the course syllabus for other details regarding late submissions.
NOTE: you should make a backup copy of all of your work on a regular basis. We will not grant extensions due to mistakenly deleted files or individual computer troubles. It is also recommended that if you do work and store your files on a personal computer you regularly backup those files by copying them into your class account (at least once a day during any of the days you work on your files).
DOUBLE CHECK WHAT YOU SUBMITTED to make sure that it is correct - in particular create a subdirectory and copy the file you submitted into that subdirectory and then untar it (tar -xvf) and check the contents to make sure they are correct - in particular compile and test the files that were extracted from the tar file. If there is a problem with the tar file you should fix it and try again.
|
See the class syllabus for policies concerning email Last Modified: Tue Aug 31 12:01:27 EDT 2004 |
|
|
|
|
|