CSE2305 - Object-Oriented Software
Engineering
assessment
In order to compile and run C++ programs you should use g++
, not gcc
.
Examine the C++ source code in the files List.h
, List.cpp
and main.cpp
(download
them from here a gziped tarball).
Makefile
that
has targets to build an executable and to remove any intermediate files.List::Node
class¤.
gdb
, trace the execution
of the code and verify your explanation (you don't have to submit
this).
List::Search(const DataType& data)
to search a list for a particular piece of data and to return true
if the data is contained in the list and false
if it is not. (Assume that the list is unsorted.)main()
to allow the user to enter a search term and inform them if the term is contained in the list or not.
List::InsertSorted(const DataType& data)
that inserts a new element in the list in the correct place to maintain lexicographical (dictionary) order.lexicographical_compare()
and toupper()
functions. Note that you will need to consider what happens to capitalised words when you insert them. List
(call it sorted
List
) to main()
. Use your new InsertSorted
routine to add each of the words read in from the user to this new list. Print out the words from the new list.
Use the UML graphic notation to draw a class diagram of the final version of your List
class.
You should submit the following:
List
classList
class
workMakefile
, with 2 targets: the default target builds the
program(s), the clean
target removes the executable and any
intermediate files (e.g. .o files created during compilation).README
with a brief explanation what you have
done (including testing) and how to perform the tests on your submission.vi
).See the submit page for details on how to submit your assignment. Please make sure all files you submit contain this student declaration which attests that your submission is your own work.
Last Modified: August 9, 2006