Find Jobs
Hire Freelancers

Application of structured record type in an array

$30-250 SGD

Abgeschlossen
Veröffentlicht vor etwa 8 Jahren

$30-250 SGD

Bezahlt bei Lieferung
Need the following question answered: HOO Condominium has 3 BBQ pits available for booking by its residents. You are tasked to design and develop a program to allow the user to book a pit given a reservation date. If there is no available pit on the given reservation date, the user is prompt to re-enter the date or enter “E” to exit the system. You are required to use the following given data structures and variables for the program. struct BBQ { int BBQNumber; // Pit Number string cal_date; // calendar date bool available; // status of pit - true if available for booking }; struct Details { string ID; // Booking ID string name; // Name of resident string addr; // Address of resident string rdate; // Reservation date of pit double fees; // $$ charged for the pit }; struct Booking { Details booking_details; BBQ pit; }; const int SIZE = 3; Booking b; // Booking of pit BBQ pits[365][SIZE]; //2-D array that store the pits information for the year (a) Develop the function, initialize() that initializes the values for 2-D array, pits. The function prototype is void initialize(). You may use your own arbitrary values. (4 marks) (b) Design and develop a function, findBBQ() to find the available BBQ pit for booking. The function prototype is BBQ findBBQ(string). The function searches the 2-D array, pits to look up for the available pit with the given reservation date which is pass in as a string variable. It returns the structure record of type BBQ to the calling function. If there is no available pit, set the BBQNumber to 0. (7 marks) (c) Design and develop a function, bookBBQ () to book the pit when one is available for booking. The function prototype is void bookBBQ(Details, BBQ). The function sets the respective values of the structure record, Booking b to the pass-in arguments value. (4 marks) (d) Demonstrate your ability to test the code by developing a test driver to call the functions written in Part (a) to (c). The test driver performs at least the following: (i) Invoke the function, initialize() to store the values of pits. (ii) Uses a loop to prompt the user to enter the reservation date. If the user enters “E”, the loop terminates, otherwise it invokes the function, findBBQ(). If the returned BBQNumber is 0, it means there is no available BBQ pit on the selected date. Display the message, “No available BBQ pit on selected date, please re-enter another date or 'E' to exit.” If there is a pit available for booking, prompt the user to enter ID, name, address and fees and invoke the function, bookBBQ() to book the pit, setting the booking_details and pit of booking, including setting the data field, available to false. (iii) Display the details of the booking. Comment your codes. Refer to the sample output screen.
Projekt-ID: 9813390

Über das Projekt

9 Vorschläge
Remote Projekt
Aktiv vor 8 Jahren

Möchten Sie etwas Geld verdienen?

Vorteile einer Ausschreibung auf Freelancer

Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten
Vergeben an:
Avatar des Nutzers
Hello, my name is Kostas and I am an expert c/c++ developer with an extensive knowledge of algorithms and data structures. All of my clients were very satisfied with my work which you can verify through my profile here! Please send me a message to discuss the details. Thank you in advance, Kostas.
$80 SGD in 2 Tagen
5,0 (5 Bewertungen)
2,4
2,4
9 Freelancer bieten im Durchschnitt $123 SGD für diesen Auftrag
Avatar des Nutzers
Hi, I can help you for this job. Please contact me to give more details about this project. I can start right now. Thank you.
$250 SGD in 3 Tagen
5,0 (4 Bewertungen)
4,2
4,2
Avatar des Nutzers
Hi, I am Software Engineer. I have skills in Desktop Application Development, Android Development and Databases. I have experience with C/C++, C#, Java, Visual Basic, SQL/MySQL, HTML/CSS and Javascript. I can do your required work. Regards, Naveed Ahmed
$100 SGD in 3 Tagen
5,0 (12 Bewertungen)
3,6
3,6
Avatar des Nutzers
Hi! Im an electrical and electronic masters student studying in UWE. I have the experience of coding in C/C++/Assembly/Arduino/PIC C/MikroC/MATLAB for more than three years. I also have the knowledge and experience of ELECTRICAL AND ELECTRONICS circuit analysis and design. I also have experience in embedded systems using microcontrollers like PIC, ATMEL, ARDUINO and most of the other types. I have done BCS (British computer society) diploma level. I have the knowledge on PHP/HTML5/mySQL for website development. I have completed many freelancer assignments successfully. If you are interested in hiring me, please send me a message. I have made a lot of reports in the recent past. I have good experience in using Microsoft office softwares like Word, Excel and Powerpoint. I can write reports of any length without mistakes. Thank you!
$36 SGD in 3 Tagen
4,9 (5 Bewertungen)
2,8
2,8
Avatar des Nutzers
I can get you the solution to this easy problem in maximum 24 hrs. I aware about C++ structures. Just approve the bid. hope to get a positive response from you.
$155 SGD in 3 Tagen
0,0 (0 Bewertungen)
0,0
0,0
Avatar des Nutzers
hello i have a vast experience of c++ programming . I am setting a a low bit since i am new to freelancer , i can assure you that i will provide you with THE best code with proper object oriented concepts . Looking foward for your reply
$77 SGD in 3 Tagen
0,0 (0 Bewertungen)
0,0
0,0
Avatar des Nutzers
HI sir i have an idea about this and i am good in c++.kindly assign me this project i can give you on time and also give you the good product. THANKS IN ADVANCE . . .
$155 SGD in 3 Tagen
0,0 (0 Bewertungen)
0,0
0,0

Über den Kunden

Flagge von SINGAPORE
Singapore, Singapore
5,0
1
Zahlungsmethode verifiziert
Mitglied seit März 1, 2016

Kundenüberprüfung

Danke! Wir haben Ihnen per E-Mail einen Link geschickt, über den Sie Ihr kostenloses Guthaben anfordern können.
Beim Senden Ihrer E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.
Registrierte Benutzer Veröffentlichte Jobs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Vorschau wird geladen
Erlaubnis zur Geolokalisierung erteilt.
Ihre Anmeldesitzung ist abgelaufen und Sie wurden abgemeldet. Bitte melden Sie sich erneut an.