Due: 30 Sep 2005
Educational objectives: Experience implementing a self-organizing linked list and a simple vector class, solving problems using the above classes, and implementing and using templates.
Statement of work: (i) Implement a linked list class that self-organizes by the transpose method and (ii) a templated vector class. (iii) Develop a simple airline reservation software, as in assignment 1, but using the containers you implemented, instead of using STL containers.
Deliverables: Turn in a makefile
and
all header (*.h) and cpp (*.cpp) files that are needed to build your
software, as described in www.cs.fsu.edu/~asriniva/courses/DS05/HWinstructions.html. Turn in your development log too, which should be a plain ASCII text file called LOG.txt
in your project directory. You will submit all of these using the project2submit.sh
script.
Requirements:
proj2
.makefile
in this directory. In addition, all the
header and cpp files needed to build your software must be present here, as well as the LOG.txt
file.Vector
class in the file vector.h. The following features must be implemented:(i) a
default constructor that
initializes an array of size 2, (ii) a destructor, (iii) void push_back(const T &e), (iv) the operator[], and (v) int size( ) const. You may implement additional features, if you wish
to. If you do not implement a copy constructor and an assignment operator, then
you should prevent their use by making them private. FirstName space [middle initials, if applicable, with a period after each initial] space LastName
.The user will enter Phone number as a sequence of digits, with possibly, spaces, hyphens, and parentheses. All these, except the digits, should be ignored. That is, the number 850-644-1234
is equivalent to the number (850) 644 1234
. The user will enter the flight number as a sequence of alphanumeric characters, without whitespace between them. The user will enter the travel date in one of the following forms: mmddyyyy
or mmddyy
. All
user input can be considered to be syntactically correct. The user is provided the ability to perform the operations given below.
Filename
(which contains a flight number followed by the number of seats, on each line), stores the information in an object of the vector class you implemented, and then repeats the following:new flight <flight-number> <seats>
quit
add
(<name>, <phone-number>, <flight-number>, <date>)
delete <name> from <flight-number> on <date>
is
<name> in <flight-number> on <date>?
lookup
<name>
display
<flight-number> on <date>
Sample input file and executable: A sample executable is available at proj2, which will run on linprog
. It runs correctly for the sample input file FLIGHTS, with the sample commands given in input1. The first person to find errors in our program will get a bonus point!
Bonus points (5):
You may get up to 5 additional points for significant extra work, such as implementing more features, or providing a GUI interface. Please obtain feedback from us prior to doing this. If you wish to get bonus points, then please submit your work as usual, but send an email to the TA. The TA will schedule a meeting with you, and you can demonstrate the special features of your software then.
Notes:
list
or vector
classes. You may use the string
class. Please get my
permission before using any other STL feature.
vector
class on an entirely different application. So it is
important for this class to be generic and exactly as specified.