Find Jobs
Hire Freelancers

Application of structured record type in an array

$30-250 SGD

Завершено
Опублікований about 8 years ago

$30-250 SGD

Оплачується при отриманні
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.
ID проекту: 9813390

Про проект

9 пропозицій(-ї)
Дистанційний проект
Активність 8 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
Доручений:
Аватарка користувача
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 за 2 дні(-в)
5,0 (5 відгуки(-ів))
2,4
2,4
9 фрілансерів(-и) готові виконати цю роботу у середньому за $123 SGD
Аватарка користувача
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 за 3 дні(-в)
5,0 (4 відгуки(-ів))
4,2
4,2
Аватарка користувача
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 за 3 дні(-в)
5,0 (12 відгуки(-ів))
3,6
3,6
Аватарка користувача
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 за 3 дні(-в)
4,9 (5 відгуки(-ів))
2,8
2,8
Аватарка користувача
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 за 3 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
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 за 3 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
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 за 3 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0

Про клієнта

Прапор SINGAPORE
Singapore, Singapore
5,0
1
Спосіб оплати верифіковано
На сайті з бер. 1, 2016

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.