Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ language Rug problem You are selling rectangular rugs, of two types: Platinum Deluxe (type 1) and Premium Grade (type 2). Every rug must be

c++ language Rug problem You are selling rectangular rugs, of two types: Platinum Deluxe (type 1) and Premium Grade (type 2). Every rug must be bound on the edge, and must have a rug pad. Your job is to calculate and display the total costs for each rug ordered, depending on the user-supplied dimensions. Rug type 1: $5 / sq foot Rug type 2: $3 / sq foot Edge: $0.42 / foot pad: $1.85 / sq foot Your program must have properly declared variables and constants, and display all the appropriate information in a formatted and logical way. In other words simply outputting 45.3 will not suffice. Expected output for a 2 x 3 rug: Your 2' x 3' Premium Grade rug will cost as follows: Rug $30.00 Edge $ 4.42 Pad $11.10 --------------------------- Total $45.30 Your program should: present the choices, and the requirements (bound edge and cost, rug pad and cost) allow the user to run multiple times check for invalid input offer the option to "order the rug" 1. If the user wants to order the rug, ask for their name (should allow for first and last and spaces), delivery street, city, state, and ideal delivery date. 2. create an "invoice" output to the screen that includes all this information as well as the output above 3. Create an invoice output to a file (rugorder.txt) formatted the same way as #2 Keep a running total of how many times the user ran the program and print it at the end. This lab assesses: Planning Algorithm design Loops Conditionals Text output formatting File writing

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

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions