Sample Output
There are three samples below
of input/output for A03.
Return to assignment description
First Sample
Resort Manager
--------------
This program creates cabins and lets them out.
Press enter...
What is the basic rental charge? 120
What is the charge for each extra bedroom? 30
What is the charge for each extra person? 20
Press enter...
How many cabins at this resort? 3
What is cabin 1's name? Daisy
How many bedrooms does Daisy have? 1
What is cabin 2's name? Violet
How many bedrooms does Violet have? 2
What is cabin 3's name? Rose
How many bedrooms does Rose have? 3
Cabin Name Num Rooms Max Occ. Basic Rental
---------- --------- -------- ------------
Daisy 1 3 120.00
Violet 2 6 150.00
Rose 3 9 180.00
Press enter...
Next Transaction [in/out/close]? in
How many guests are there in this group? 5
We will put you in Violet
The rent for 5 guests is 170.0
Next Transaction [in/out/close]? in
How many guests are there in this group? 1
We will put you in Daisy
The rent for 1 guests is 120.0
Next Transaction [in/out/close]? close
Cabin Name Guests Base Rate Surcharge Rent for Night
---------- ------ --------- --------- --------------
Daisy 1 120.00 0.00 120.00
Violet 5 150.00 20.00 170.00
Rose 0 180.00 0.00 0.00
Press enter...
Next Transaction [in/out/close]? out
What room are you leaving? Daisy
Thank you. Please come again.
Next Transaction [in/out/close]? in
How many guests are there in this group? 6
We will put you in Rose
The rent for 6 guests is 180.0
Next Transaction [in/out/close]? in
How many guests are there in this group? 2
We will put you in Daisy
The rent for 2 guests is 120.0
Next Transaction [in/out/close]? close
Cabin Name Guests Base Rate Surcharge Rent for Night
---------- ------ --------- --------- --------------
Daisy 2 120.00 0.00 120.00
Violet 5 150.00 20.00 170.00
Rose 6 180.00 0.00 180.00
Press enter...
Next Transaction [in/out/close]? out
What room are you leaving? Violet
Thank you. Please come again.
Next Transaction [in/out/close]? in
How many guests are there in this group? 6
We will put you in Violet
The rent for 6 guests is 190.0
Next Transaction [in/out/close]? in
How many guests are there in this group? 3
I'm sorry, but we cannot accomodate your party.
Next Transaction [in/out/close]? close
Cabin Name Guests Base Rate Surcharge Rent for Night
---------- ------ --------- --------- --------------
Daisy 2 120.00 0.00 120.00
Violet 6 150.00 40.00 190.00
Rose 6 180.00 0.00 180.00
Press enter...
The total income over 3 days was $1250.00.
Press enter...
Second Sample
Resort Manager
--------------
This program creates cabins and lets them out.
Press enter...
What is the basic rental charge? 120
What is the charge for each extra bedroom? 30
What is the charge for each extra person? 20
Press enter...
How many cabins at this resort? 3
What is cabin 1's name? Daisy
How many bedrooms does Daisy have? 1
What is cabin 2's name? Violet
How many bedrooms does Violet have? 2
What is cabin 3's name? Rose
How many bedrooms does Rose have? 3
Cabin Name Num Rooms Max Occ. Basic Rental
---------- --------- -------- ------------
Daisy 1 3 120.00
Violet 2 6 150.00
Rose 3 9 180.00
Press enter...
Next Transaction [in/out/close]? in
How many guests are there in this group? 1
We will put you in Daisy
The rent for 1 guests is 120.0
Next Transaction [in/out/close]? in
How many guests are there in this group? 1
We will put you in Violet
The rent for 1 guests is 150.0
Next Transaction [in/out/close]? in
How many guests are there in this group? 1
We will put you in Rose
The rent for 1 guests is 180.0
Next Transaction [in/out/close]? close
Cabin Name Guests Base Rate Surcharge Rent for Night
---------- ------ --------- --------- --------------
Daisy 1 120.00 0.00 120.00
Violet 1 150.00 0.00 150.00
Rose 1 180.00 0.00 180.00
Press enter...
Next Transaction [in/out/close]? out
What room are you leaving? Daisy
Thank you. Please come again.
Next Transaction [in/out/close]? in
How many guests are there in this group? 2
We will put you in Daisy
The rent for 2 guests is 120.0
Next Transaction [in/out/close]? close
Cabin Name Guests Base Rate Surcharge Rent for Night
---------- ------ --------- --------- --------------
Daisy 2 120.00 0.00 120.00
Violet 1 150.00 0.00 150.00
Rose 1 180.00 0.00 180.00
Press enter...
Next Transaction [in/out/close]? out
What room are you leaving? Rose
Thank you. Please come again.
Next Transaction [in/out/close]? in
How many guests are there in this group? 3
We will put you in Rose
The rent for 3 guests is 180.0
Next Transaction [in/out/close]? close
Cabin Name Guests Base Rate Surcharge Rent for Night
---------- ------ --------- --------- --------------
Daisy 2 120.00 0.00 120.00
Violet 1 150.00 0.00 150.00
Rose 3 180.00 0.00 180.00
Press enter...
The total income over 3 days was $1350.00.
Press enter...
Third Sample
Resort Manager
--------------
This program creates cabins and lets them out.
Press enter...
What is the basic rental charge? 80
What is the charge for each extra bedroom? 10
What is the charge for each extra person? 5
Press enter...
How many cabins at this resort? 4
What is cabin 1's name? Termite
How many bedrooms does Termite have? 1
What is cabin 2's name? Mouse
How many bedrooms does Mouse have? 1
What is cabin 3's name? Ants
How many bedrooms does Ants have? 1
What is cabin 4's name? Rat
How many bedrooms does Rat have? 2
Cabin Name Num Rooms Max Occ. Basic Rental
---------- --------- -------- ------------
Termite 1 3 80.00
Mouse 1 3 80.00
Ants 1 3 80.00
Rat 2 6 90.00
Press enter...
Next Transaction [in/out/close]? in
How many guests are there in this group? 1
We will put you in Termite
The rent for 1 guests is 80.0
Next Transaction [in/out/close]? in
How many guests are there in this group? 3
We will put you in Mouse
The rent for 3 guests is 85.0
Next Transaction [in/out/close]? in
How many guests are there in this group? 1
We will put you in Ants
The rent for 1 guests is 80.0
Next Transaction [in/out/close]? close
Cabin Name Guests Base Rate Surcharge Rent for Night
---------- ------ --------- --------- --------------
Termite 1 80.00 0.00 80.00
Mouse 3 80.00 5.00 85.00
Ants 1 80.00 0.00 80.00
Rat 0 90.00 0.00 0.00
Press enter...
Next Transaction [in/out/close]? out
What room are you leaving? Mouse
Thank you. Please come again.
Next Transaction [in/out/close]? out
What room are you leaving? Ants
Thank you. Please come again.
Next Transaction [in/out/close]? close
Cabin Name Guests Base Rate Surcharge Rent for Night
---------- ------ --------- --------- --------------
Termite 1 80.00 0.00 80.00
Mouse 0 80.00 0.00 0.00
Ants 0 80.00 0.00 0.00
Rat 0 90.00 0.00 0.00
Press enter...
Next Transaction [in/out/close]? close
Cabin Name Guests Base Rate Surcharge Rent for Night
---------- ------ --------- --------- --------------
Termite 1 80.00 0.00 80.00
Mouse 0 80.00 0.00 0.00
Ants 0 80.00 0.00 0.00
Rat 0 90.00 0.00 0.00
Press enter...
The total income over 3 days was $405.00.
Press enter...
Return to
assignment description