Homework 9, I've got them on my list.
Short Description:
Write a program which maintains a list of naughty, nice and unclassified
clients.
This assignment is worth 100 points.
Goals
When you finish this homework, you should:
- Strengthened your skills with c++ data structures.
- Demonstrated your agility to use dynamic memory and recursion.
- Demonstrated you ability to design, implement and employ classes.
Formal Description
You have been hired by a non-profit organization to assist in classifying it's
clients as naughty or nice. The organization maintains surveillance of clients
constantly, recording a log entry for each occurrence of naughty-ness and nice-ness observed. This log entry contains an integer representing the severity of the entry, negative for naughty, positive for nice, the client's name, enclosed in quotes, and a brief description of the observed behavior. The following is
an example of several log entries:
-3 "Mr. Jones" broke a bat on Johnny's head
-4 "Adam" hid a frog in sister's bed
5 "Ms. M" Played nice with others
-15 "Nate" spilled some ink on Mommy's rug
-4 "Mattie" made Tommy eat a bug
-12 "Eric" bought some gum with a penny slug
1 "Chip" Taught someone how to do math.
-4 "Stevie" Put a tack on teacher's chair
-10 "David" Tied a knot in Suzy's hair
-2 "Eddie" did a dance on Mommy's plants
-8 "Brett Maverick" Filled that sugar bowl with ants
10 "Dan" Allowed students to turn in really late corrections to programs
You should process the file observations.log to create naughty, nice and neutral lists. Naughty clients have a total negative score, nice clients have a positive score and neutral clients have a score of zero. There may be multiple entries for a client, which may necessitate a move from one list to another.
The supervisor of the agency needs a copy of the lists, sorted by client score, to be produced after each run of the program. The list should include a title, followed by client name and score, one client per line. Write the lists to the files naughty.txt, nice.txt, and unknown.txt.
Discussion
- You may not use any elements of the standard template library standard container classes.
- You must implement a client class.
- You must implement a linked list based on dynamic memory.
- You must implement a list class. This class should contain all required methods for a class with dynamic memory.
- You must have at least one recursive routine.
- You must follow the class documentation standards described in chapter 12. You program will be graded using these standards.
- Your classes should be in separate specification and implementation files.
- You should create a sub-directory and perform all work for this project within this directory. This will make the creation of the tar file easier.
- If you need help, you should ask.
Required Files
You should submit the following in a tar file:
- All source code required to build all programs.
- A makefile which will build all programs as well as clean the directory
- A README describing
- Author identification information
- The project
- Problems encountered
- Any portions of the code which are not working.
- Any unique features of the code.
- Any other information you wish to share.
You should not submit
- Object files or executable.
- Core files.
- Source code files which are not related to the project.
Submission
Please create a tar file containing the files described above. Email this file to danbennett360@gmail.com by class time of the due date.