(Solved) : Sorry Posting Long Question C First Part Uml Queue Using Maincpp Queuecpp Queueh Using Fir Q42739111 . . .

Queue -elements [50] : int -size: int -head: int -tail: int -numof Queues: int +Queue () +getQueueLength():int +getQueueMaxSi

Notes about the queue class . when you enqueue, if for any reason the number is not put on the queue, the outpi o 5 was not p

cout << Part 1 << endl; // printout the number of queues with a new line after // Declare a queue called q2 // Decolare a q

cout << The queue: ; ql.printueue (1 : cout < Part 3 << endl; 1/ Print out the number that is in the front of the queue //

Sample Output Part 1 Enter a start value: 4 Enter an end value: 32 Enter a multiple value: 5 Part 2 The queue: 5 10 15 20 25

Ride -rideName: string -capacity:int // how many on ride at a time -ride Lenth: double // in minutes +fastPass : Queue +stand

O TURIA LISTRE ERU main #include Ride.h #include <iostream- using namespace std: int main() Ride disney[10] int numRides =

1/zybook/SIUECS 145 letznerfall2019 chapter/section/25 to Computing for Engineers home > 7 23. Chapter 70 disney[1]standby en

SIUECS145TetznerFall2019/chapter/T/section/23 ng for Engineers home > 7:23. Chapter 70 Sample Output Ride: Peter Pan Capacity

errent file, main.cpp Queue.h Queue.cpp Rideh Ride opp

Sorry for posting such a long question

this will be in C++, the first part being just a UML for theQueue using main.cpp, Queue.cpp, and Queue.h using the first mainposted

The second part is using the Queue.cpp and Queue.h to work withthe Ride UML with the second Main.cpp given, with the Ride.cpp andRide.h

Im having a tough time figuring it out, thank you so much

Main for first part-

copy this main and complete it

#include <iostream>#include “Queue.h”using namespace std;int main(){ int startVal; int endVal; int multsOf; int numRemove; // Declare a queue called q1 cout << “Part 1” << endl; // printout the number of queues with a new line after it // Declare a queue called q2 // Decclare a queue called q3 // printout the number of queues with a new line after it cout << “Enter a start value: “; cin >> startVal; cout << “Enter an end value: “; cin >> endVal; cout << “Enter a multiple value: “; cin >> multsOf; cout << “Part 2” << endl; // Write a loop to enqueue onto q1 all the multples of the // multsOf. between (and including) the startVal and endVal cout << “The queue: “; q1.printQueue(); cout << “Part 3” << endl; // Print out the number that is in the front of the queue // See output for format cout << “Remove one from queue” << endl; // remove an element from the queue // Print out the number that is in the front of the queue // See output for format // Print out the number of elements in the queue // See output for format cout << “The queue: “; q1.printQueue(); cout << “Part 4” << endl; cout << “Enter how many elements you want to remove from the queue: “; cin >> numRemove; // Write the code to remove the correct number of elements from the queue cout << “The queue: “; q1.printQueue(); return 0;}

Main for the second part-

main

#include “Ride.h”#include <iostream>using namespace std;int main(){ Ride disney[10]; int numRides = 3; disney[0].setRideName(“PeterPan”); disney[0].setCapacity(150); disney[0].setRideLength(6.2); for (int i = 0; i < 4; ++i) { disney[0].fastPass.enqueue(i * 2); disney[0].standby.enqueue(i * 3); } disney[0].fastPass.enqueue(25); disney[0].fastPass.enqueue(37); disney[1].setRideName(“SmallWorld”); disney[1].setCapacity(450); disney[1].setRideLength(12.5); for (int i = 0; i < 6; ++i) { disney[1].fastPass.enqueue(i * 4); disney[1].standby.enqueue(i * 5); } disney[1].fastPass.enqueue(83); disney[1].fastPass.enqueue(91); disney[1].standby.enqueue(71); disney[1].standby.enqueue(72); disney[1].standby.enqueue(73); disney[1].standby.enqueue(74); disney[1].standby.enqueue(75); disney[2].setRideName(“SpaceMountain”); disney[2].setCapacity(105); disney[2].setRideLength(3.4); for (int i = 0; i < 4; ++i) { disney[2].fastPass.enqueue(i + 7); disney[2].standby.enqueue(i + 2); } disney[2].standby.enqueue(15); disney[2].standby.enqueue(8); for (int i = 0; i < numRides; ++i) disney[i].printRide(); string ride; int queueType; int numGettingOnRide; cout << “Enter the name of the ride you want to change: “; cin >> ride; cout << “Enter which queue to take people out of (1. fastPass or 2. standby): “; cin >> queueType; cout << “Enter number of people getting on ride: “; cin >> numGettingOnRide; // Write the code to search the array for the ride entered, and then // calls dequeue on the correct queue to take the people out of the // queue and put them on the ride // If the ride is not in the queue, print “That ride doesn’t exist” for (int i = 0; i < numRides; ++i) disney[i].printRide(); return 0;}Queue -elements [50] : int -size: int -head: int -tail: int -numof Queues: int +Queue () +getQueueLength():int +getQueueMaxSize(): int +get NumberOf Queues (): int +enqueue (num:int) : void +dequeue ():void +print Queue ():void +inFront () :int +isEmpty(): boolean +returnHi(): String Notes about the queue class . when you enqueue, if for any reason the number is not put on the queue, the outpi o 5 was not put on the queue . if you dequeue and the queue is empty it should say o Queue is empty. Can’t Dequeue. • if the queue is empty and you call in Front, it should return a-1 copy this main and complete it #include <iostream> #include “Queue.h” using namespace std; int main() int startval; int endval; int multsof; int numRemove; 11 Declare a queue called gi cout << “Part 1” << endl; 11 printout the number of queues with a new line after it cout << “Part 1” << endl; // printout the number of queues with a new line after // Declare a queue called q2 // Decolare a queue called q3 // printout the number of queues with a new line after i cout << “Enter a start value: cin >> StartVal; cout << “Enter an end value: “; cin >> endval; cout << “Enter a multiple value: “; cin >> multsof; cout << “Part 2” << endl; // Write a loop to enqueue onto gi all the multples of th 1 multsof. between (and including the startval and endv. cout << “The queue: “; cout << “The queue: “; ql.printueue (1 : cout < Part 3” << endl; 1/ Print out the number that is in the front of the queue // See output for format cout << “Remove one from queue” e endl W remove an element from the queue // Print out the number that is in the front of the queue // See output for format 1/ Print out the number of elements in the queue // See output for format cout << “The queue ql.print Queue () cout <“Part 4” endi cout<<“Enter how many elements you want to remove from the queue cin >> Remove: 1/ write the code to remove the correct number of elementa from the queue cout << ” ql.print queue (); return 0; Sample Output Sample Output Part 1 Enter a start value: 4 Enter an end value: 32 Enter a multiple value: 5 Part 2 The queue: 5 10 15 20 25 30 Part 3 The number in front of queue: 5 Remove one from queue The number in front of queue: 10 There are 5 elements in the queue The queue: 10 15 20 25 30 Part 4 Enter how many elements you want to remove from the queue: 2 The queue: 20 25 30 LAB ACTIVITY 7.22.1: Chapter 70 Ride -rideName: string -capacity:int // how many on ride at a time -ride Lenth: double // in minutes +fastPass : Queue +standby: Queue +Ride () +Ride (rideName:string) +Ride (rideName:string, capacity:int, rideLength:double) +setRideName (rideName:string):void +setCapacity (capacity:int) : void +setRide Length (num: double):void +getRideName(): string +get Capacity ( ) :int +getRideLength(): double +printRide():void O TURIA LISTRE ERU main #include “Ride.h” #include <iostream- using namespace std: int main() Ride disney[10] int numRides = 3; disney[0].setRideName(“Peter Pan”); disney[0].setCapacity (150); disney[0].setRideLength(6.2); for (int i = 0; i < 4; ++i) disney[o] . East Pass.enqueue (i – 2); disney [0].standby.enqueue (i – 3); disney [0] . fastPass.enqueue (25) disney [0). fastPass.enqueue (37) disney[1].setRideName (“SmallWorld”); disney[1].setCapacity (450); disney[1].setRide Length(12.5); for (int i = 0; i < 6; ++i) disney [1] . fastPass.enqueue ſi 4); disney[1].standby.enqueue (i + 5); disney[1].fastPass.enqueue (83); disney[1] . fastPass. enqueue (91); disney[1] . standby.enqueue (71); disney[1].standby.enqueue (72); disney[1].standby-enqueue (73); disney[1].standby.enqueue (74); disney[1].standby.enqueue (75); disney[2.setRideName (“SpaceMountain”); disney[2].setCapacity (105); disney [2] . setRide Length (3.4); for (int i = 0; i < 4; ++i) disney [21. fastPass.enqueue li + 7); 1/zybook/SIUECS 145 letznerfall2019 chapter/section/25 to Computing for Engineers home > 7 23. Chapter 70 disney[1]standby enqueue (75) disney[2].setRideName (“SpaceMountain”) disney[2] .setCapacity (105); disney(2].setRideLength (3.4); for (int i = 0; i < 4; ++i) disney [2] . fastPass.enqueue (i + 7 disney[2].standby.enqueue ( + 2); disney[2].standby.enqueue (15); disney(2) – standby.enqueue (8) for (int i = 0; i < numRides; ++i) disneyti).printRide() string ride; int queue Type: int numGettingOnRide: cout << “Enter the name of the ride you want to change: cin >> ride; cout << “Enter which queue to take people out of (1. fastPass or 2 cin >> queue Type: cout << “Enter number of people getting on ride: “; cin >> numGettingOnRide; 1/ Write the code to search the array for the ride entered, and th- call, dequeue on the correct queue to take the people out of the queue and put them on the ride If the ride is not in the queue, print “That ride doesn’t exist for (int i = 0; i<numides; ++i) disney 11-printRidet); return 0; We were unable to transcribe this imageerrent file, main.cpp Queue.h Queue.cpp Rideh Ride opp Show transcribed image text Queue -elements [50] : int -size: int -head: int -tail: int -numof Queues: int +Queue () +getQueueLength():int +getQueueMaxSize(): int +get NumberOf Queues (): int +enqueue (num:int) : void +dequeue ():void +print Queue ():void +inFront () :int +isEmpty(): boolean +returnHi(): String
Notes about the queue class . when you enqueue, if for any reason the number is not put on the queue, the outpi o 5 was not put on the queue . if you dequeue and the queue is empty it should say o Queue is empty. Can’t Dequeue. • if the queue is empty and you call in Front, it should return a-1 copy this main and complete it #include #include “Queue.h” using namespace std; int main() int startval; int endval; int multsof; int numRemove; 11 Declare a queue called gi cout

Expert Answer


Answer to Sorry for posting such a long question this will be in C++, the first part being just a UML for the Queue using main.cp…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us