Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please point out any errors you may see! The manager of a hotel wants a program that calculates and displays a guests total bill. Each
Please point out any errors you may see!
- The manager of a hotel wants a program that calculates and displays a guests total bill. Each guest pays a room charge that is based on a per-night rate and how many nights the guest stays. Customers also may incur a one-time room service charge and a one-time telephone charge.
Inputs | Process | Outputs |
roomCharge | nightStay | billTotal |
serviceCharge |
|
|
phoneCharge |
|
|
Pseudo Code:
- Enter value of roomCharge
- Enter value of nightStay
- Enter value of serviceCharge
- Enter value of phoneCharge
- Multiply nightStay and roomCharge then add other values to find billTotal
- Display billTotal
Desk Check
roomCharge | nightStay | serviceCharge | phoneCharge | billTotal |
|
|
|
|
150 | 3 | 50 | 75 | (150*3=450) 450+50+75= 575 |
|
|
|
|
100 | 5 | 75 | 60 | (100*5=500) 500+75+60=635 |
|
|
|
|
- A store is having a sale. The manager wants a program that allows the sales clerk to enter the original price of an item and the discount rate. The program should calculate and display the sale price.
Inputs | Process | Outputs |
orignialPrice |
| salePrice |
discountRate |
|
|
|
|
|
Pseudo Code:
- Enter value for originalPrice
- Enter value for discountRate
- Calculate salePrice by multiplying discountRate by originalPrice and subtract discount
- Display salePrice
Desk Check
orignialPrice | discountRate | salePrice |
|
|
|
|
|
|
50 | .25 | (50*.25)=12.5 50-12.5= 37.5 |
|
|
|
|
|
|
75 | .35 | (70*.35=24.5)=50.5 |
|
|
|
|
|
|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started