COP3538: Project 2 - Stacks and Priority Queues - Singly Linked List - Computer Science Assignment Help

Download Solution Order New Solution
Assignment Task:

Requirements: 
1.
Reuse your State class from Project 1 (modify it if necessary) 
2. Create a class named Stack that will implement a stack of state objects using a singly linked list. Support the following methods. 
a. Constructor that creates the stack. 
b. A push method to push a state on the stack 
c. A pop method to pop a state off the stack and return it. 
d. A printStack method to print the stack, see the example. 
e. An isEmpty method that returns true if the stack is empty, false otherwise 
f. An isFull method that always returns false 
3. Create a class named PriorityQueue that implements a priority queue of state objects using an array, based on population, highest population is the highest priority. Support the following methods: 
a. Constructor that creates the stack array based on a size provided. 
b. An insert method to insert a state into the queue. 
c. A remove method to remove a state from the front of the queue and return it. 
d. A printQueue method to print the queue in priority order, see the example. 
e. An isEmpty method that returns true if the queue is empty, false otherwise 
f. An isFull method that returns true if the queue is full, false otherwise 
4. Create a class named Project2 that will: 
a. Read the csv file (States2.csv) of states and create a single stack of state objects containing states from regions South Pacific, West, and Middle Atlantic (discard any states not in those regions, do not modify the input file.). 
b. Print the stack starting with the top of the stack. 
c. Create three priority queues, one for each region. 
d. Pop states off the stack one at a time and insert them into the appropriate priority queue until the stack is empty. 
e. Print all three priority queues in this order: South Pacific, West, then Middle 
f. Remove items from the South Pacific priority queue, one at a time, and push them on the stack. 
g. Remove items from the West priority queue, one at a time, and push them on the stack. 

This COP3538: Computer Science Assignment has been solved by our Computer Science Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

 

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.