
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Instructions for assignment 4 in cecs 274 programming and problem solving ii course. Students are required to create a queue adt using c++ and an array, including operations like enqueue, dequeue, isempty, front, length, and print.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

To create an ADT for a simple Queue. You must understand the logical design of queues, and use classes, structs and arrays to complete this project.
Modify your class ArrayList from Assignment 3, to be a C++ class called Queue that represents a queue of information. The queue will be implemented using an array. The information stored in the list should be a student record containing a student ID number and a letter grade. You must include the following operations in your class Queue : ® Queue() -- Creates an empty queue. ® IsEmpty() -- Determines whether a queue is empty. Returns a Boolean value TRUE if the list is empty, FALSE otherwise. ® Enqueue(NewItem, Success) -- Inserts NewItem at the end of the queue. Success is set to TRUE if Enqueue is successful, FALSE otherwise. ® Dequeue(Success) -- Deletes the first item from the queue item from the queue. Success is set to TRUE if Dequeue is successful, FALSE otherwise. ® Front(Item, Success) -- Retrieves the value of the data at the front of the queue. The value of the data item is returned in Item. Success is set to TRUE if Front is successful, FALSE otherwise. ® Length() -- Returns a count of the number of items stored in the queue. ® Print() -- Prints the contents of the queue, from front to back, neatly formatted.
Duplicate ID numbers are allowed in the queue. You will be provided with a main program that tests your package.
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 preconditions and postconditions). Please see the handout provided with Assignment 2 on Program Documentation. Note : Spelling and grammar are important. Dr. Tracy Bradley Maples