Courses

222230281371

COSC 281 -- Data Structures

Syllabus
Grades

Announcements

Schedule for remainder of the semester:

  • Nov. 20: adjacency lists/traversals
  • Nov. 25: shortest path
  • Dec. 2: minimal spanning tree
  • Dec. 4: exam review/course evaluations

Appointment program is due on Sunday November 2, 2008.

REMINDER: Test 3 is on Thursday October 23, 2008.

REMINDER: Test 2 is on Thursday October 2, 2008.

REMINDER: Test 1 is on Thursday September 11, 2008.


Class Notes (copyright D.S. Malik, 2004)

Chapter 1
Chapter 2
Chapter 3
Linked Lists
Stacks/Queues
Binary Trees
AVL Trees
Graphs

In Class Examples

Loops
Branching
Parameters/Functions
Inheritance example: Person class  Employee class  Inheritance Test Program
Time class: Time class  Time test program
Linked Lists: Node Class  Linked List Program
Pointers

Assignments

Implement the graph code from the book. Create a simple test program that reads in a graph from a text file "graph.txt" and performs the depth first and breadth first traversals on the graph. Due Dec. 5, 2008 by 5:00 pm.

For the next assignment you are asked to implement the Binary Search Tree code from chapter 11 and specifically perform the indicated traversal on a 9000 node BST.

The following table provides the algorithm for each student:
InorderRecursiveDru Luce-Edwards
InorderIterativeLaura White
PreorderRecursiveSarah Rasnake
PreorderIterativeJonathan Moore
PostorderRecursiveMatt Butler
PostorderIterativeJeremy Smith
  Derrick Layne

Here are some necessary files:
bst.txt: text file
skeleton code
PostOrder, Iterative version

Due on Thursday November 13, 2008 by class time.

Using your Appointment class; create an appointment manager program that will allow the user to read in a list of appointments from a file, view those appointments, make changes (add, delete) to the list, and finally save the list to the file when they are finished.
All appointments will be saved in a file called appointments.txt".
I recommend using a linked list but you can do this program with stacks or queues if you want.
Turn in your Appointment class files, including the Date and Time class files and your manager program code to me through email by Sunday November 2, 2008. Here are example Date and Appointment classes.

Using the Time and Date classes, create an Appointment class. An appointment consists of a date, time, and a description of the appointment. I recommend using composition but this problem can be solved using multiple inheritance. You need to support input and output of an appointment. Use this program to check your code. Due Friday September 26, 2008 by 5:00 pm.

Create a Date class with overloaded stream insertion and extraction operators. Use this simple program to test your code.

A Date has three fields: month, day, and year. Follow good programming technique, provide useful comments, and be sure to include all necessary functionality.
Due Friday September 12, 2008 by 11:59 pm.

Using the Point class, create a Circle class. A circle is defined by a point and a radius. Include methods for getting and setting all of the private data members, appropriate constructors, a method for outputting information about the circle, and any other methods you feel would be useful for a circle class. Due Sunday August 31, 2008 by midnight. Email your Circle class (.h and/or .cpp) file(s) to me at jps5a.

Site HelpTerms of Use/Privacy Statementwebmaster@uvawise.edu
Copyright © The University of Virginia's College at Wise. All Rights Reserved
One College Avenue • Wise, Virginia 24293 • 888-282-9324 • info@uvawise.edu