Anne Dawson: CSCI201A_LAB3_FA04.htm   

 

Last updated: Saturday 18th September 2004, 14:46 PT

 

This document is subject to change without notice.

 

Please report any errors or omissions in this document:

adawson@coquitlamcollege.com

 

Special instructions:  For this assignment you may work in teams of 2, or alone.

This lab is due at the end of the lab session.

 

 

CSCI201A – Data and Program Organization (Data Structures)

Fall 2004

Lab Assignment 3

 

 

Purpose: Implement a singly linked list of Student objects.

Program points will be based on the following marking scheme:

Category

Points

Description

Comments

10

Source code should be commented.

Output

10

Prompts and results should be user-friendly.

Student class

10

implemented as specified below

LinkedList class

10

implemented as specified below

Driver program

10

implemented as specified below

Correctness

30

The program should do what is required.

Style

10

The source code should be indented properly, use meaningful variable names, use good programming practices, etc. See the book, website and lectures for examples.

Test

10

Comments in the code explain how the code was tested.

 

Specification :  The purpose of this lab is to implement a singly-linked linked list of student objects. You should create a Student class for the generation of student objects which contain member data on last name (string), first name (string), score (int) and a pointer (reference) to a Student object.  The class should contain a default constructor and another constructor with three arguments - one for each data member, and other functions as necessary. You should create a StudentLinkedList class with one data member; a pointer (or reference) to the head Student object, and member functions (methods) to add a new node to the head of the list, delete a node from the head, and print out the details of each node in the list. Write a driver to test your class. Enhance the program in any way you wish. 

Source Code Format : As stated above, the source code should follow good programming style. In addition, each file should start with a comment block that contains the following information:

/*

File Name:

Student Name 1:

Student Name 2:

Description:

Date: 

*/

 

Assignment Presentations :  In the next class, two individuals (or teams)

will be selected at random to present their results to the group.