Find Jobs
Hire Freelancers

Dynamic Queues

$10-30 USD

Imekamilika
Imechapishwa almost 10 years ago

$10-30 USD

Kulipwa wakati wa kufikishwa
ATTENTIONS: **********MUST USE MY CODES ATTACHED IN FILES************** struct Donut { string flavor = ""; float price = 0.0; Donut(string flvr, float prc) { flavor = flvr; price = prc; } Donut(){} }; struct DonutTray { Donut** donuts; int capacity, front = 0, back = 0, count = 0; DonutTray(int size) { capacity = size; donuts = new Donut*[capacity]; } }; void displayDonut(Donut* donut) - displays the favor and price of the donut structure referenced by the donut pointer void displayDonutTray(DonutTray* tray) - iterates over the array of donut references in the structure referenced by tray pointer, and uses displayDonut() to display each of the donuts referenced by the pointers in the tray array void enqueueDonut(DonutTray* tray, Donut* donut) - enqueues the donut structure referenced by the donut pointer into the donuts array in the tray structure at the back index. Increments the count and back index making sure the back index does not go beyond the tray’s capacity Donut* dequeueDonut(DonutTray* tray) - dequeues the donut structure at the front index from the donuts array in the tray structure. Decrements the count and increments front index making sure the front index does not go beyond the tray’s capacity. Returns the dequeued donut Sample Output [0] Donut: Chocolate $0.99 [1] Donut: Boston Crm $0.99 [2] Donut: Jelly $0.99 [3] Donut: Glazed $0.99 Donut: Chocolate $0.99 [1] Donut: Boston Crm $0.99 [2] Donut: Jelly $0.99 [3] Donut: Glazed $0.99 [1] Donut: Boston Crm $0.99 [2] Donut: Jelly $0.99 [3] Donut: Glazed $0.99 [4] Donut: Eclair $0.99 [0] Donut: Snowy $0.99 Donut: Boston Crm $0.99 Donut: Jelly $0.99 [3] Donut: Glazed $0.99 [4] Donut: Eclair $0.99 [0] Donut: Snowy $0.99 [1] Donut: Moonraker $0.99
Kitambulisho cha mradi: 6003607

Kuhusu mradi

3 mapendekezo
Mradi wa mbali
Inatumika 10 yrs ago

Unatafuta kupata pesa?

Faida za kutoa zabuni kwenye Freelancer

Weka bajeti yako na muda uliopangwa
Pata malipo kwa kazi yako
Eleza pendekezo lako
Ni bure kujiandikisha na kutoa zabuni kwa kazi
Imetolewa kwa:
Picha ya Mtumiaji
A proposal has not yet been provided
$10 USD ndani ya siku 1
5.0 (2 hakiki)
2.8
2.8
3 wafanyakazi huru wana zabuni kwa wastani $13 USD kwa kazi hii
Picha ya Mtumiaji
Hello. I am C/C++ expert and I would be able to do it in short time. Thanks...............................
$15 USD ndani ya siku 1
4.9 (281 hakiki)
6.2
6.2
Picha ya Mtumiaji
A proposal has not yet been provided
$14 USD ndani ya siku 1
5.0 (4 hakiki)
2.4
2.4

Kuhusu mteja

Bedera ya UNITED STATES
Cambridge, United States
4.9
22
Mwanachama tangu Apr 16, 2013

Uthibitishaji wa Mteja

Asante! Tumekutumia kiungo cha kudai mkopo wako bila malipo kwa barua pepe.
Hitilafu fulani imetokea wakati wa kutuma barua pepe yako. Tafadhali jaribu tena.
Watumiaji Waliosajiliwa Jumla ya Kazi Zilizochapishwa
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Onyesho la kukagua linapakia
Ruhusa imetolewa kwa Uwekaji wa Kijiografia.
Muda wako wa kuingia umeisha na umetoka nje. Tafadhali ingia tena.