week2Ecercise - #include...

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 DocumentRight 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 DocumentRight 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 &quot;hotel.h&quot; #include &lt;iostream&gt; void hotel::getInfo() { Sheet1 Page 2 for(int x=0 x&lt;5 { cout&lt;&lt;&quot;please enter the guest room&quot;&lt;&lt;endl cin&gt;&gt;roomNumber[x] cout&lt;&lt;&quot;please enter the guest's name&quot;&lt;&lt;endl cin&gt;&gt;guestName[x] cout&lt;&lt;&quot;please enter the guest's room charge&quot;&lt;&lt;endl cin&gt;&gt;roomCharge[x] cout&lt;&lt;&quot;please enter the guest's meal charge&quot;&lt;&lt;endl cin&gt;&gt;mealCharge[x] cout&lt;&lt;&quot;Room #: &quot;&lt;&lt;roomNumber[x]&lt;&lt;&quot; Guest Name: &quot;&lt;&lt;guestName[x]&lt;&lt;&quot; Sheet1 Page 3 Sheet1 Page 4 x++) Room Charge: &quot;&lt;&lt;...
View Full Document

Page1 / 4

week2Ecercise - #include...

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

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