Anyone knows the solution to the project-"Queue Management Part 1" | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Anyone knows the solution to the project-"Queue Management Part 1"

You are working on a Queue management system and need to create the class to hold the queue data, which are customer IDs (integers). You make a Queue class, which has a size attribute, and an array, to hold the data of the queue. The class has a remove() method to remove the front item of the queue, a print() method to output the queue. You need to create an add() method for the Queue class, that will take an item and add it to the end of the queue. The code needs to be fully working, so that the Queue declaration and manipulation code in main() works. https://code.sololearn.com/cMFAtD5Z3h39/?ref=app

12th Dec 2020, 4:26 AM
NiTESH
NiTESH - avatar
2 Antworten
+ 3
Look carefully at line 43. The add() function is taking an integer as it's parameter and is not returning anything. So the function signature at line 35 should look like this void add (int item) { // your code }
13th Dec 2020, 5:06 AM
Minho
Minho - avatar
0
I'm unable to completely get this code can you pls explain?
13th Dec 2020, 6:17 AM
NiTESH
NiTESH - avatar