Question: Copy THE code to Dev++. and then See this complete code and then tell me the following info. 1:Who many classes use in this code?
Copy THE code to Dev++. and then
See this complete code and then tell me the following info. 1:Who many classes use in this code? And also their names? 2: where is the base class tell me by row number? 3: where is polymorphism tell me by row number? 4: where is File handling? Tell me by row number. 5: where is an abstract class? Mention row number. 6: where is the virtual function in this code? Mention row number.
(Urgent Please)
*Thanks*
#include#include #include #define max 100 using namespace std; //Class Customer class Customer { public: char name[100]; char address[100]; char phone[12]; char from_date[20]; char to_date[20]; float payment_advance; int booking_id; }; class Room { public: char type; char stype; char ac; int roomNumber; int rent; int status; class Customer cust; class Room addRoom(int); void searchRoom(int); void deleteRoom(int); void displayRoom(Room); }; //Global Declarations class Room rooms[max]; int count=0; Room Room::addRoom(int rno) { class Room room; room.roomNumber=rno; cout<<" Type AC/Non-AC (A/N) : "; cin>>room.ac; cout<<" Type Comfort (S/N) : "; cin>>room.type; cout<<" Type Size (B/S) : "; cin>>room.stype; cout<<" Daily Rent : "; cin>>room.rent; room.status=0; cout<<" Room Added Successfully!"; getch(); return room; } void Room::searchRoom(int rno) { int i,found=0; for(i=0;i >rno; for(i=0;i >rooms[i].cust.booking_id; cout<<" Enter Customer Name (First Name): "; cin>>rooms[i].cust.name; cout<<" Enter Address (only city): "; cin>>rooms[i].cust.address; cout<<" Enter Phone: "; cin>>rooms[i].cust.phone; cout<<" Enter From Date: "; cin>>rooms[i].cust.from_date; cout<<" Enter to Date: "; cin>>rooms[i].cust.to_date; cout<<" Enter Advance Payment: "; cin>>rooms[i].cust.payment_advance; rooms[i].status=1; cout<<" Customer Checked-in Successfully.."; getch(); } } //hotel management shows available rooms void HotelMgnt::getAvailRoom() { int i,found=0; for(i=0;i >days; billAmount=days * rooms[i].rent; cout<<" \t######## CheckOut Details ######## "; cout<<" Customer Name : "< >opt; //switch statement switch(opt) { case 1: cout<<" Enter Room Number: "; cin>>rno; i=0; for(i=0;i >rno; room.searchRoom(rno); break; case 3: //nothing to do break; default: cout<<" Please Enter correct option"; break; } }while(opt!=3); } using namespace std; int main() { class HotelMgnt hm; int i,j,opt,rno; char ch; char pname[100]; system("cls"); do { system("cls"); cout<<"######## Hotel Management ######### "; cout<<" 1. Manage Rooms"; cout<<" 2. Check-In Room"; cout<<" 3. Available Rooms"; cout<<" 4. Search Customer"; cout<<" 5. Check-Out Room"; cout<<" 6. Guest Summary Report"; cout<<" 7. Exit"; cout<<" Enter Option: "; cin>>opt; switch(opt) { case 1: manageRooms(); break; case 2: if(count==0) { cout<<" Rooms data is not available. Please add the rooms first."; getch(); } else hm.checkIn(); break; case 3: if(count==0) { cout<<" Rooms data is not available. Please add the rooms first."; getch(); } else hm.getAvailRoom(); break; case 4: if(count==0) { cout<<" Rooms are not available. Please add the rooms first."; getch(); } else { cout<<"Enter Customer Name: "; cin>>pname; hm.searchCustomer(pname); } break; case 5: if(count==0) { cout<<" Rooms are not available. Please add the rooms first."; getch(); } else { cout<<"Enter Room Number : "; cin>>rno; hm.checkOut(rno); } break; case 6: hm.guestSummaryReport(); break; case 7: cout<<" THANK YOU! FOR USING SOFTWARE"; break; default: cout<<" Please Enter correct option"; break; } }while(opt!=7); getch(); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
