Answered step by step
Verified Expert Solution
Link Copied!

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!

  1. 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:

  1. Enter value of roomCharge
  2. Enter value of nightStay
  3. Enter value of serviceCharge
  4. Enter value of phoneCharge
  5. Multiply nightStay and roomCharge then add other values to find billTotal
  6. 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

  1. 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:

  1. Enter value for originalPrice
  2. Enter value for discountRate
  3. Calculate salePrice by multiplying discountRate by originalPrice and subtract discount
  4. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Multidimensional Array Data Management In Databases

Authors: Florin Rusu

1st Edition

1638281483, 978-1638281481

More Books

Students also viewed these Databases questions

Question

Describe three potential sources in recruiting sales personnel. LO4

Answered: 1 week ago