Corrections, clarifications, and other announcements regarding this programming assignment will be found below.
For this assignment you will modify the database you developed in Programming Assignment p1 by keeping the students in a linked list ordered by student ID. You'll also make your code more object-oriented by using C++ classes for the ordered linked list and to represent the student information stored in the list.
The goals of this assignment are to gain experience:
For this assignment you will complete the implementation files (i.e., the source files) for two classes for which we've provided the interface files (i.e., the header files). We've also provided an object file for the main program that uses the classes that you implement and has the same commands as used in Programming Assignment p1.
The Student class is used to represent individual students that you represented as structs in Programming Assignment p1. Each Student object will again contain a student ID, the total number of credits, and the student's overall GPA. The header file containing the interface for the Student class is given in Student.h. You can copy this file from this location:
Complete the Student class by writing all of the member functions as described in the header file.
The SortedList class is used to implement an ordered singly-linked list of students. The list is ordered by student ID from smallest to largest. The header file containing the interface for the SortedList class is given in SortedList.h. You can copy this file from this location:
Complete the SortedList class by writing all of the member functions as described in the header file.
We have provided you with the code for the main program, which you must make work with your code. You can copy the main program containing the user interface from this location:
The user interface has already been compiled into object code. Since C++ object code is platform-dependent (unlike Java bytecode, which is platform-independent), the precompiled file of the user interface requires you to do your work on the mumble Linux machines.
In order to create an executable for your program, you'll need to link the user interface object code with the object code for your classes. The following Linux commands show how this can is done:
g++ -c Student.cpp g++ -c SortedList.cpp g++ Student.o SortedList.o studentDB.o -o runDB
The first two commands compile the source files that you've implemented. The third command links the object files for this program and creates an executable named runDB.
The commands that our user interface accepts are the same as those for Programming Assignment p1 plus an additional "help" command:
All error checking and bounds checking is done in the user interface object code given to you. You do not need to add any. In particular, you may assume that all values passed to constructors or functions are valid and have the appropriate range as described in Programming Assignment p1.
Make sure your code follows the style and commenting standards used in CS 302 and CS 367. Note: the commenting standards use javadoc comments for class, method, and constructor headers. You do not need to use javadoc comments in your c++ programs for CS 368; however, your comments should include the same information as the javadoc comments. For example, your function header comments should include a description of what the function does, the name and a short description of each parameter, and a description of the return value.
Electronically submit the following file to your in "handin" directory by the due date and time (late policy):
Please turn in only the files named above. Extra files clutter up the "handin" directories.
© 2012-2013 CS368 Instructors