c++ program / code -- 2
$10-30 USD
Paid on delivery
QUESTION 1: Defining the Class Cinema
Define and implement a class Cinema as described below.
• Data Members:
◦ The cinemaId data member is the cinema ID.
◦ The cinemaName data member is a string variable that represents the cinema name.
◦ The noOfBookedSeats data member is an integer that represents the number of Customers in the Cinema object, a maximum iof 50 customers.
◦ The customers data member is an array of 50 elements of string that represents the name of customer.
• Member functions
◦ Default constructor:
1) The cinemaId =1, name= “Cinema”, noOfBookedSeats to zero, customers all set to “N/A” .
◦ Initializer constructor (String d, string n)
1) Sets cinemaId to d, name to n, noOfBookedSeats to zero, customers all set to “N/A” .
◦ A Copy Constructor.
◦ getCinemaid(): that returns the cinema Id.
◦ getCustomer (int position): that return the customer name in index position.
◦ void addReservation(string name): which checks if there is space in the cinema and then add the customer to the cinema. Increase booked seats. Write the appropriate cout messages.
◦ void deleteReservation(string name): which checks if the customer already reserved a seat in a cinema and if yes delete the reservation and shift all the reservations in the customers array. Write the appropriate cout messages
◦ bool isThereEmptySpace(): that return true if the cinema has empty seats and return ◦ false if there are no empty seats.
◦ getNumberofBookedCustomers (): that return the number of customers in the current cinema.
◦ bool HasMoreCustomers (Cinema &c2): that compares the current cinema object with the given cinema object c2, if the current cinema object has more customers then return true, otherwise return false.
◦ int HasSameCustomers (Cinema &c2): that compares the current cinema object with the given cinema object c2, and returns how many common customers have reserved seats in both cinema objects.
◦ void print(): which prints the details of the cinema object: Cinema ID, Cinema Name, and number of booked seats
◦ destructor: that print a goodbye message for the cinema customers
“Cinema CinemaName is closed”
QUESTION 2: Driver Program:
1. Define an array of 4 cinemas called CinemaBuiding. Let the user add 1 customer to first cinema, 2 for second, 3 customers for third and 4 customers for fourth cinema.
2. Print out the details of the CinemaBuiding.
3. Print out the first customer of the third cinema.
4. Delete the reservation of second customer from the third cinema.
5. Print out if there are empty seats in the second cinema.
6. Print out if there are no customers in the fourth cinema.
7. Which cinema has more customers: the first cinema or the fourth cinema?
8. Write a function that determines which two cinemas has the most common customers, use HasSameCustomers function
Project ID: #29775722
About the project
Awarded to:
Hi, Yes I have seen the Programme details,. Both questions -class cinema -Driver program can be done in just 1 day in this assigned budget. I have one query. ** you need both questions in separate text file ** Shoul More
12 freelancers are bidding on average $24 for this job
Hello, I will do simplest coding in C++, C using OOP, data structures concepts. It looks like an assignment so coding will be easily understandable for u. I have done many C/C++ works here. Lets have a chat for furthe More
Who am I? I am a professional developer with graduation in BS Computer Science with more than 3 years of experience in IT/Software Engineering Programming Languages C# C C++ SQL Python Assembly Java Services More
Hi sir I am interested to work with you. I can provide you professional web design services. I can design for you according to your requirements. I will give you unlimited revision until you will not satisfy for your d More
Hi, I am an experienced C++ developer with 7+ years of experience. I will be pleased to do this project for you. Please inbox to discuss further details. Regards, Sharjeel
Hello Sir/ Ma’am We are a group of Software Engineers (Programmers) having 10+ years of experience. Expert in JAVA, C, C++ , C# , Python, MATLAB. Done 700+ projects here on FREELANCER.COM. The bid is negotiable an More
I am a C and C++ programmer with 4 years of experience. I am thorough with all the concepts and will deliver you the solution as soon as possible.
hello I can do your project perfectly I have an experience with c++ coding and competitive programming on codeforces message me
Hi, I am a software engineer with 3+ years of experience in the field of software development. I have worked on the C++ projects and delivered the project in the said field. I have also worked on many assignments dur More
Hi, I have checked your your requirements. I am willing to do your project kindly contact with me that can I start work on your project
Hi dear client, I have read your description. My carrier starts as an Electrical Engineer I developed an intuitive feeling about engineering development, I’m an expert in algorithm, C program++, Mat lab, circuit desig More