I've got a piece of work to do, i have done the majority of it, just the last, and the most important thing lol, that i am stuck with.
there are 4 classes, Room, Bedroom (type of room), ConferenceRoom (type of room) and Date(in a header file).
Expand|Select|Wrap|Line Numbers
- class Room{
- private:
- int roomNumber;
- double rate;
- string customer;
- Date booking;
- public:
- Room (int, double);
- void bookRoom (string, Date);
- Date getBooking() {return booking;}
- double getRate();
- int getRoomNumber();
- string getDetails();
- };
- class Bedroom{
- friend class Room;
- private:
- string facilities;
- public:
- Bedroom (int, double, string);
- string getDetails;
- };
- class ConferenceRoom{
- friend class Room;
- private:
- int seatingCapacity;
- public:
- ConferenceRoom (int, double, int);
- int getCapacity;
- string getDetails();
- };
takes info about a hotel and its rooms from a text file (DONE)
put that info into a vector name Rooms (Done, sort of)
i then need to be able to print info about the rooms using the getDetails member functions from the three room classes.
i need to be able to book a room by getting the user to input the date they require and there name.
need to be able to show all vacant rooms for a inputted date.
need to be able to show the hotels income for a certain date by adding up the price from what hotels are booked for a certain date,
Expand|Select|Wrap|Line Numbers
- vector <Room> Hotel;
Also, is there any way i can hold objects of type Bedroom and ConferenceRoom inside the vector for Rooms?
it seems a lot but once i grasp the vecotr situation i think it will be easier!
i cant find any good tutorials with vecotrs that are of type that is user defined!
Its just that i cant find any way of doing what i am supposed to do!!
Any help much appreciated!!
thanks
Shaun