Topics for Final Examination
Data Structures
May 3, 2001
The final examination will be in two parts. Part one
will be take home and will be given to the students on May 1st in class.
Each student will be given a diskette containing several partial
programs. The students will be expected to complete that program.
It will be turned in with the second part of the final examination.
It will be weighted as approximately one third of the final exam.
The second part of the examination will be in class during
the regularly scheduled class at 9:30 on May 3rd. It will last until
10:50. The topics that students are responsible for are:
-
Read a line from the keyboard.
-
Write a function that would fill an array with N random values.
-
Declare an array.
-
Declare a file variable.
-
Open a file for output.
-
Close a file.
-
Write N values from an array to a file.
-
Write a generic function that would sort the first N elements
of an array using the bubble sort.
-
Be able to give the results of each pass of a bubble sort.
-
Write a generic function that would sort the first N elements
of an array using the insert sort.
-
Be able to give the results of each pass of a insert sort.
-
Write a generic function that would sort the first N elements
of an array using the quick sort.
-
Be able to hand sort an array using the quick sort.
-
Write a procedure that would obtain from the user the name
of an input file, the name of an output file, and the number of elements
to be processed.
-
Write a procedure that would read N numbers from an input
file into an array. The parameters of the procedure are the filename,
the array, and the number.
-
Write a procedure that would write N numbers from an array
to an output file, with 10 numbers per line. The parameters of the
procedure are the filename, the array, and the number.
-
Write a C++ header file as specified by the instructor.
-
Write the implementation of a C++ header file.
-
Write a stack class declaration.
-
Define a stack.
-
Draw a stack after a series of stack operations.
-
Write a stack class declaration.
-
Define a stack.
-
Draw a stack after a series of stack operations
-
Implement each of the stack operations
-
constructor & destructor
-
pop
-
push
-
top
-
empty
-
Draw diagrams of each stack operation
-
Draw a picture of the heap after
-
a pop operation
-
a push operation
-
a series of operations
-
Understand post-fix notation
-
Write a program evaluating a file of post-fix expressions
-
Write a program reading numbers from a file and inserting
them into a tree
-
Write a program that would time various sort routines.
-
Draw a tree after an insert operation
-
Write a tree class declaration
-
Implement some of the elements of a tree class.
-
Recursive insert operation
-
Recursive write operations
-
Recursive delete operation
-
Public operations.