Project to create a simple database class

In this project you are to build a class called SDB which stands for simple data base.  It is nothing more than a linked list of last names where each name node has a pointer to a struct of information about that person.  Here is a picture of the contents of a class object.

The above data structure is a simple unsorted linked list when initially created.  It will always be possible to rearrange this list based on any variable we choose.  We for instance could sort on name, sort on age or sort on height.   Define the info block as a struct as follows

struct info{
   int ID;
   float age;
   enum classification{Freshman, Sophomore, Junior, Senior}
   string uni
}
class sdb{
  struct info * dataptr;
public
  sdb();  //default constructor
  Add(name, info}// Adds a new student to the linked list (at the end)
  Del(name)// Removes the student from the linked list.
This entry was posted in Algorithms. Bookmark the permalink.

Comments are closed.