CECS 274 Assignment 3: Creating ArrayList Class for Sorted Student Records in C++, Assignments of Computer Science

The instructions for assignment 3 of cecs 274 programming and problem solving ii course. Students are required to design and implement a c++ class called arraylist representing a simple sorted list of student records. The list will be implemented using an array, and students must include operations such as creating an empty list, checking if the list is empty, inserting new items in increasing order by student id number, retrieving data items by id number, and printing the list contents. The document also includes programming notes and submission instructions.

Typology: Assignments

Pre 2010

Uploaded on 08/18/2009

koofers-user-pek
koofers-user-pek 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CECS 274 Programming and Problem Solving II
Assignment 3
Due Wednesday, October 4, 2000
Purpose:
To create an ADT for a simple list. You must understand the logical design of simple lists, and
use classes, structs and arrays to complete this project.
Problem:
Design and implement a C++ class called ArrayList that represents a simple list of information.
The list will be implemented using an array. The information stored in the list will be a student
record containing a student ID number and a letter grade. The list will be sorted into increasing
order by student ID number.
You must include the following operations in your class ArrayList:
ArrayList() -- Creates an empty list.
ALEmpty() -- Determines whether a sorted list is empty. Returns a Boolean value
TRUE if the list is empty, FALSE otherwise.
ALInput(NewItem, Success) -- Inserts NewItem into list in increasing order by
Student ID number. Success is set to TRUE if ALInput is successful, FALSE otherwise.
ALRetrieve(IDnumber, Item, Success) -- Retrieves the data item by the specified by
IDnumber. The value of the data item is returned in Item. Success is set to TRUE if
ALRetreive is successful, FALSE otherwise.
ALLength() -- Returns a count of the number of data items stored in the linked list.
ALPrint() -- Prints the contents of a list, neatly formatted.
Programming Notes:
Duplicate ID numbers are not allowed in your linked list.
You will be provided with a main program that tests your package.
Submission:
Turn in and demonstrate your completed C++ program during lab.
Your submission should include specification information for the modular design of this
program. You should include program documentation and specifications for each function you
will be using (including purpose, preconditions and postconditions). Please see the handout
provided with Assignment 2 on Program Documentation. Note: Spelling and grammar are
important.
Dr. Tracy Bradley Maples

Partial preview of the text

Download CECS 274 Assignment 3: Creating ArrayList Class for Sorted Student Records in C++ and more Assignments Computer Science in PDF only on Docsity!

CECS 274 Programming and Problem Solving II

Assignment 3

Due Wednesday, October 4, 2000

Purpose:

To create an ADT for a simple list. You must understand the logical design of simple lists, and use classes, structs and arrays to complete this project.

Problem:

Design and implement a C++ class called ArrayList that represents a simple list of information. The list will be implemented using an array. The information stored in the list will be a student record containing a student ID number and a letter grade. The list will be sorted into increasing order by student ID number. You must include the following operations in your class ArrayList :  ArrayList() -- Creates an empty list.  ALEmpty() -- Determines whether a sorted list is empty. Returns a Boolean value TRUE if the list is empty, FALSE otherwise.  ALInput(NewItem, Success) -- Inserts NewItem into list in increasing order by Student ID number. Success is set to TRUE if ALInput is successful, FALSE otherwise.  ALRetrieve(IDnumber, Item, Success) -- Retrieves the data item by the specified by IDnumber. The value of the data item is returned in Item. Success is set to TRUE if ALRetreive is successful, FALSE otherwise.  ALLength() -- Returns a count of the number of data items stored in the linked list.  ALPrint() -- Prints the contents of a list, neatly formatted.

Programming Notes:

Duplicate ID numbers are not allowed in your linked list. You will be provided with a main program that tests your package.

Submission:

Turn in and demonstrate your completed C++ program during lab. Your submission should include specification information for the modular design of this program. You should include program documentation and specifications for each function you will be using (including purpose, preconditions and postconditions). Please see the handout provided with Assignment 2 on Program Documentation. Note : Spelling and grammar are important. Dr. Tracy Bradley Maples