QUESTION PROVIDE IN ATTACHMENT. KINDLY SEE   ---------------------USE BELOW TEMPLATES WHILE MAKING SOLUTIONS----------------------- MAIN.CPP #include #include #include //#include "Hall.cpp" #include "HallBO.cpp" using namespace std; int main(){ int n, choice, p; string name, ownerName, hallName; int contactNumber; double costPerDay; static list hallList; list::iterator it; Hall h3; HallBO hbo; hallList = h3.getHallDetails(); do{ cout<<"1.Add\n"; cout<<"2.Remove\n"; cout<<"3.Display\n"; cout<<"Enter your choice\n"; cin>>choice; //fill the code }while(p==1); }   HallBo.cpp #include #include "Hall.cpp" #include using namespace std; class HallBO{ public: Hall h; bool contains(list halls, string hallName){ //fill the code } void display(list halls){ //fill the code } };   Hall.cpp #include #include #include using namespace std; class Hall{ private: string name; int contactNumber; double costPerDay; string ownerName; public: Hall(){ } Hall(string name, int contactNumber, double costPerDay, string ownerName){ this->name = name; this->contactNumber = contactNumber; this->costPerDay = costPerDay; this->ownerName = ownerName; } list getHallDetails(){ list hallList; hallList.push_back(Hall("Chiltington",1798888137,30000,"Robert")); hallList.push_back(Hall("Kilmersdon",1761436767,22000,"James")); return hallList; } void setName(string name){ this->name=name; } string getName(){ return this->name; } void setContactNumber(int contactNumber){ this->contactNumber=contactNumber; } int getContactNumber(){ return this->contactNumber; } void setCostPerDay(double costPerDay){ this->costPerDay=costPerDay; } double getCostPerDay(){ return this->costPerDay; } void setOwnerName(string ownerName){ this->ownerName=ownerName; } string getOwnerName(){ return this->ownerName; } };

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

QUESTION PROVIDE IN ATTACHMENT. KINDLY SEE

 

---------------------USE BELOW TEMPLATES WHILE MAKING SOLUTIONS-----------------------

MAIN.CPP

#include <iostream>
#include <stdio.h>
#include<list>
//#include "Hall.cpp"
#include "HallBO.cpp"
using namespace std;
int main(){
int n, choice, p;
string name, ownerName, hallName;
int contactNumber;
double costPerDay;
static list<Hall> hallList;
list<Hall>::iterator it;
Hall h3;
HallBO hbo;
hallList = h3.getHallDetails();

do{
cout<<"1.Add\n";
cout<<"2.Remove\n";
cout<<"3.Display\n";
cout<<"Enter your choice\n";
cin>>choice;
//fill the code
}while(p==1);
}

 

HallBo.cpp

#include<iostream>
#include "Hall.cpp"
#include<list>
using namespace std;
class HallBO{
public:
Hall h;
bool contains(list <Hall> halls, string hallName){
//fill the code
}
void display(list<Hall> halls){
//fill the code
}
};

 

Hall.cpp

#include <iostream>
#include <stdio.h>
#include<list>
using namespace std;
class Hall{
private:
string name;
int contactNumber;
double costPerDay;
string ownerName;
public:
Hall(){ }
Hall(string name, int contactNumber, double costPerDay, string ownerName){
this->name = name;
this->contactNumber = contactNumber;
this->costPerDay = costPerDay;
this->ownerName = ownerName;
}
list<Hall> getHallDetails(){

list<Hall> hallList;
hallList.push_back(Hall("Chiltington",1798888137,30000,"Robert"));
hallList.push_back(Hall("Kilmersdon",1761436767,22000,"James"));
return hallList;
}

void setName(string name){
this->name=name;
}
string getName(){
return this->name;
}
void setContactNumber(int contactNumber){
this->contactNumber=contactNumber;
}
int getContactNumber(){
return this->contactNumber;
}
void setCostPerDay(double costPerDay){
this->costPerDay=costPerDay;
}
double getCostPerDay(){
return this->costPerDay;
}
void setOwnerName(string ownerName){
this->ownerName=ownerName;
}
string getOwnerName(){
return this->ownerName;
}
};
The Dancing Champs institution is organizing a dance competition for kids. The competition
will have various levels and batches and can go on for a full day. They do not have enough
space to accommodate so many dancers in their institute so they book a banquet with many
halls. Initially, the number of performances is fixed but can increase later and even hall
allotment can be revised as well. So they can replace/remove data from any hall at any time.
You are the accommodation head of the institute and need to propose a plan so that you can
hire halls anytime. Ask the Institute for the initial number of performances then display the
menu as described in input and output format.
Write a C++ program to add new details in the existing ArrayList and to remove details from
the ArrayList. Use Menu to add, remove and display the Hall details.
Strictly adhere to the Object-Oriented specifications given in the problem statement. All
class names, member variable names and function names should be the same as specified
in the problem statement.
Create Hall class with private member variables
Data type
string
int
double
string
Variables
name
contactNumber
costPerDay
ownerName
Include appropriate getters, and setters and constructor
(name,contactNumber,costPerDay,ownerName) in this order for the Hall class.
Include following public member function in Hall class
Method Name
Description
This method is used to return the hall details.
list<Hall> getHallDetails()
[Hall details are already pre-populated in the template code]
Create HallBO class and include following member function
Method Name
bool contains(list <Hall> halls, string hallName )
Description
This function is used to compare whether the hall list contains that hall nam
If the hall name presents it returns true to remove that name otherwise
returns false.
void display(list<Hall> halls)
This function is used to display the list of halls along with hardcoded details.
Use "%-25s%-25d%-25.2f%-25s\n" to print table the details.
In the main method test the above class and print the string "Hall Details:" in the main
method itself
Input and Output format:
Print the costPerDay with two decimal values.
Refer sample input and output for formatting specifications.
[All text in bold corresponds to input and the rest corresponds to output]
Sample Input and Output 1:
1.Add
2.Remove
3.Display
Enter your choice
3
Hall Details:
Hall Name
Contact Number
Cost
Owner
Chiltington
1798888137
30000.00
Robert
Kilmersdon
1761436767
22000.00
James
Press 1 to continue
2
Sample Input and Output 2:
1.Add
2.Remove
3.Display
Enter your choice
1
Enter the details of Hall
Hall Name:
Mahal
Contact Number:
1761436007
Cost per day:
22000
Owner Name:
Akshay
Press 1 to continue
1
1.Add
2.Remove
3.Display
Enter your choice
1
Enter the details of Hall
Hall Name:
Manor
Contact Number:
1515232061
Cost per day:
25000
Owner Name:
Jack
Press 1 to continue
1
1.Add
2.Remove
3.Display
Enter your choice
3
Hall Details:
Hall Name Contact Number Cost
Owner
Mahal
1761436007
22000.00 Akshay
Manor
1515232061
25000.00
Jack
Chiltington 1798888137
30000.00
Robert
Kilmersdon 1761436767
22000.00
James
Press 1 to continue
1
1.Add
2.Remove
3.Display
Enter your choice
Enter the Hall name to be removed
Kilmersdon
Press 1 to continue
1
1.Add
2.Remove
3.Display
Enter your choice
3
Hall Details:
Hall Name
Contact Number Cost
Owner
Mahal
1761436007
22000.00
Akshay
Manor
1515232061
25000.00
Jack
Chiltington 1798888137
30000.00
Robert
Press 1 to continue
Transcribed Image Text:The Dancing Champs institution is organizing a dance competition for kids. The competition will have various levels and batches and can go on for a full day. They do not have enough space to accommodate so many dancers in their institute so they book a banquet with many halls. Initially, the number of performances is fixed but can increase later and even hall allotment can be revised as well. So they can replace/remove data from any hall at any time. You are the accommodation head of the institute and need to propose a plan so that you can hire halls anytime. Ask the Institute for the initial number of performances then display the menu as described in input and output format. Write a C++ program to add new details in the existing ArrayList and to remove details from the ArrayList. Use Menu to add, remove and display the Hall details. Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names and function names should be the same as specified in the problem statement. Create Hall class with private member variables Data type string int double string Variables name contactNumber costPerDay ownerName Include appropriate getters, and setters and constructor (name,contactNumber,costPerDay,ownerName) in this order for the Hall class. Include following public member function in Hall class Method Name Description This method is used to return the hall details. list<Hall> getHallDetails() [Hall details are already pre-populated in the template code] Create HallBO class and include following member function Method Name bool contains(list <Hall> halls, string hallName ) Description This function is used to compare whether the hall list contains that hall nam If the hall name presents it returns true to remove that name otherwise returns false. void display(list<Hall> halls) This function is used to display the list of halls along with hardcoded details. Use "%-25s%-25d%-25.2f%-25s\n" to print table the details. In the main method test the above class and print the string "Hall Details:" in the main method itself Input and Output format: Print the costPerDay with two decimal values. Refer sample input and output for formatting specifications. [All text in bold corresponds to input and the rest corresponds to output] Sample Input and Output 1: 1.Add 2.Remove 3.Display Enter your choice 3 Hall Details: Hall Name Contact Number Cost Owner Chiltington 1798888137 30000.00 Robert Kilmersdon 1761436767 22000.00 James Press 1 to continue 2 Sample Input and Output 2: 1.Add 2.Remove 3.Display Enter your choice 1 Enter the details of Hall Hall Name: Mahal Contact Number: 1761436007 Cost per day: 22000 Owner Name: Akshay Press 1 to continue 1 1.Add 2.Remove 3.Display Enter your choice 1 Enter the details of Hall Hall Name: Manor Contact Number: 1515232061 Cost per day: 25000 Owner Name: Jack Press 1 to continue 1 1.Add 2.Remove 3.Display Enter your choice 3 Hall Details: Hall Name Contact Number Cost Owner Mahal 1761436007 22000.00 Akshay Manor 1515232061 25000.00 Jack Chiltington 1798888137 30000.00 Robert Kilmersdon 1761436767 22000.00 James Press 1 to continue 1 1.Add 2.Remove 3.Display Enter your choice Enter the Hall name to be removed Kilmersdon Press 1 to continue 1 1.Add 2.Remove 3.Display Enter your choice 3 Hall Details: Hall Name Contact Number Cost Owner Mahal 1761436007 22000.00 Akshay Manor 1515232061 25000.00 Jack Chiltington 1798888137 30000.00 Robert Press 1 to continue
Expert Solution
steps

Step by step

Solved in 8 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY