Find Jobs
Hire Freelancers

Application of structured record type in an array

$30-250 SGD

Terminado
Publicado hace alrededor de 8 años

$30-250 SGD

Pagado a la entrega
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 del proyecto: 9813390

Información sobre el proyecto

9 propuestas
Proyecto remoto
Activo hace 8 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
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 en 2 días
5,0 (5 comentarios)
2,4
2,4
9 freelancers están ofertando un promedio de $123 SGD por este trabajo
Avatar del usuario
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 en 3 días
5,0 (4 comentarios)
4,2
4,2
Avatar del usuario
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 en 3 días
5,0 (12 comentarios)
3,6
3,6
Avatar del usuario
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 en 3 días
4,9 (5 comentarios)
2,8
2,8
Avatar del usuario
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 en 3 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
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 en 3 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
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 en 3 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de SINGAPORE
Singapore, Singapore
5,0
1
Forma de pago verificada
Miembro desde mar 1, 2016

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.