Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Room cost is based on the room rate and the number of nights stayed. A room tax

ID: 3636222 • Letter: R

Question

Room cost is based on the room rate and the number of nights stayed. A room tax rate of 9.5% of the cost of the room is charged to all customers. Room cost added to room tax forms the room subtotal. Sales tax of 7.5% is charged to room service amounts and together room service and sales tax represent the service subtotal. Total due is the sum of room cost, room tax, room service, and sales tax (or the 2 subtotals).

A sample statement is shown below:
===============================================
EZ HOTEL STATEMENT

Room # 333
Room rate $ 100.00
Nights stayed 7

Room cost.........$ 700.00
Room tax..........$ 66.50
Room subtotal $ 766.50

Room service......$ 500.00
Sales tax.........$ 37.50
Service subtotal $ 537.50

TOTAL DUE...........................$ 1304.00
===============================================

Design a C++ program that will do the following:

use named constants for fixed values
interactively prompt the user for the following data in the order shown below
room number (int, max of 4 digits in length)
room rate (double, max will be 250.00)
nights stayed (int, max will be 100)
cost of room service (double, max will be 1000.00)
display your name, section #, and the assignment #
using the input values and billing policies, compute
room cost, room tax, room subtotal
sales tax, service subtotal
total due
display a nicely formatted statement (see sample above and terminal session example below)
make sure that your statement conforms to the specifications listed below
Formatting Specifications

choose an appropriate character to use as a "frame" for the statement (in the examples = is used)
make sure that the lengths of the "framing" lines are the same and extend to the last digit in the subtotal/total column

include all titles, labels and blank lines shown in the examples
display room number and nights stayed as integers
display all dollar amounts with a $ sign and 2 digits to the right of the decimal
use periods (setfill) to connect labels and $ signs for the lines shown in examples
left justify labels
right justify numeric values - make sure that you leave enough room (using setw) to display values (use maximum values stated in the input description to determine how wide to set the display field)

Explanation / Answer

int rnum,days; double rate,cost_rservice; printf("Enter Room Number # "); cin>>rnum; printf("Enter Room Rate # "); cin>>rate; printf("Enter Nights Stayed # "); cin>>days; printf("Enter Room Service Cost # "); cin>>cost_rservice; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote