CSC-126 (Asessment)
CSC-126 (Asessment)
#include <iostream>
using namespace std;
int main ()
{
cout<<"\nWelcome to L Residence Vacation Home\n"<<endl;
//INPUT
cout<<"Please enter your name:";
getline(cin, owner_name);
cout<<"Enter your pet's name:";
getline(cin, pet_name);
cout<<"Enter your pet type:";
getline(cin, pet_type);
if(room==1){
cout<<"[You have booked the Savannah suite]"<<endl;
roomtype="The Savannah suite";
}
else if(room==2){
cout<<"[You have booked the Beachcombers
suite]"<<endl;
roomtype="The Beachcombers suite";
}
else if(room==3){
cout<<"[You have booked the Malibu suite] "<<endl;
roomtype="The Malibu suite";
}
else {
cout<<"[You have booked the Royal mews suite]"<<endl;
roomtype="The Royal Mews suite";
}
if (room == 1 )
price = 130;
else if (room == 2)
price = 150;
else if (room == 3)
price = 180;
else
price = 200;
cout<<"\n////////////////////////////////"<<endl;
cout<<endl<<" Extra services"<<endl;
cout<<"----------------"<<endl;
if(ex_service == y)
{
loop=y;
while(loop == y)
{
//OUTPUT
price=price*(date_checkout - date_checkin + 1);
exprice=exprice*(date_checkout - date_checkin +
1);
totalprice=exprice + price;
if(ex_service == n){
cout<<"\n////////////////////////////////"<<endl;
cout<<endl<<"Enter check-in day:";
cin>>day_checkin;
cout<<"Enter checkout day:";
cin>>day_checkout;
//OUTPUT
price=price*(date_checkout - date_checkin + 1);
totalprice=price;
}
}
//DOG
if(room==1){
cout<<"\nYou have booked the Playpen suite"<<endl;
roomtype="The Playpen suite";
}
else if(room==2){
cout<<"\nYou have booked the Sky suite"<<endl;
roomtype="The sky suite";
}
else if(room==3){
cout<<"\nYou have booked the Meadow suite "<<endl;
roomtype="The Meadow suite";
}
else {
cout<<"\nYou have booked the Club suite"<<endl;
roomtype="The Club suite";
}
if (room == 1 )
price = 100;
else if (room == 2)
price = 130;
else if (room == 3)
price = 150;
else
price = 200;
cout<<"\n////////////////////////////////"<<endl;
cout<<endl<<" Extra services"<<endl;
cout<<"----------------"<<endl;
if(ex_service == y)
{
loop=y;
while(loop == y)
{
cout<<"Choose what extra service you want :";
cin>>extraservice;
//OUTPUT
if(ex_service == n){
//OUTPUT
}
}
if(room==1){
cout<<"\nYou have booked the with cage suite"<<endl;
roomtype="The with cage suite";
}
else {
cout<<"\nYou have booked the without cage
suite"<<endl;
roomtype="The Without cage suite";
}
if (room == 1 )
price = 70;
else
price = 90;
cout<<"\n////////////////////////////////"<<endl;
cout<<endl<<" Extra services"<<endl;
cout<<"----------------"<<endl;
if(ex_service == y)
{
loop=y;
while(loop == y)
{
//OUTPUT
}
if(ex_service == n){
//OUTPUT
}
}
//OUTPUT
cout<<"\n------------------------------------------
------------------------"<<endl;
cout<<"\nYOUR RECEIPT"<<endl;
cout<<"-------------"<<endl;
cout<<"\n";
cout<<"Name of the owner
:"<<owner_name<<endl;
cout<<"Pet type :"<<pet_type<<endl;
cout<<"Pet's name :"<<pet_name<<endl;
cout<<"Room type/suite :"<<roomtype<<endl;
cout<<"Check-in day
:"<<day_checkin<<endl;
cout<<"Check-out day
:"<<day_checkout<<endl;
cout<<"Check-in date
:"<<date_checkin<<"/"<<month_checkin<<endl;
cout<<"Check-out date
:"<<date_checkout<<"/"<<month_checkout<<endl;
cout<<"your original price :"<<"RM
"<<price<<endl;
cout<<"your extra service price:"<<"RM
"<<exprice<<endl;
cout<<"Your total price is :"<<"RM
"<<totalprice<<endl;
cout<<"\n[ 6% Government service tax ]"<<endl;
cout<<"\nYour new total price is :"<<"RM "<<
totalprice+(totalprice*0.06)<<endl;
cout<<"\nThank You And Come Again ;)";
return 0;
}
Welcome to L Residence Vacation Home
////////////////////////////////
----------------
////////////////////////////////
Extra services
----------------
////////////////////////////////
------------------------------------------------------------------
YOUR RECEIPT
-------------
//OUTPUT
- Name of the owner
- Pet type
- Pet's name
- Room type/suite
- Check-in day
- Check-out day
- Check-in date
- Check-out date
- your original price
- your extra service price
- Your total price is
- Your new total price is