{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

week2Ecercise -...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 .h #include <iostream> #include <string> using namespace std class hotel { public: void print() const void getInfo() string getRoom() private: double mealCharge[3] double roomCharge[3] string roomNumber[3] string guestName[3] double totalCharge[3] double totalGuestCharge double totalRoomCharge double totalMealCharge double grandTotal int totalRooms int totalGuest } MAIN #include "hotel.h" #include <iostream> using namespace std #include <string> using namespace std int main() { hotel myHotel myHotel.getInfo() return 0 } definition
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: #include "hotel.h" #include <iostream> void hotel::getInfo() { Sheet1 Page 2 for(int x=0 x<5 { cout<<"please enter the guest room"<<endl cin>>roomNumber[x] cout<<"please enter the guest's name"<<endl cin>>guestName[x] cout<<"please enter the guest's room charge"<<endl cin>>roomCharge[x] cout<<"please enter the guest's meal charge"<<endl cin>>mealCharge[x] cout<<"Room #: "<<roomNumber[x]<<" Guest Name: "<<guestName[x]<<" Sheet1 Page 3 Sheet1 Page 4 x++) Room Charge: "<<...
View Full Document

{[ snackBarMessage ]}

Page1 / 4

week2Ecercise -...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online