Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++, using for while loop a. Write a program that output the cost of framing a picture based on the user's information: Frame Type Cost

C++, using for while loop image text in transcribed
a. Write a program that output the cost of framing a picture based on the user's information: Frame Type Cost per inch Regular 0.15 Fancy 0.25 For all frame types the cost of putting a cardboard paper behind the picture is $0.02 per square inch, and the cost of putting glass on top of the picture is $0.07 per square inch. (this is included by default in all purchases) The cost of coloring the frame is 0.10 per inch. (Hint: when the cost is given per square inch, then you need to consider the area of the rectangle. While if it given per inch, then you have to consider the perimeter of the rectangle in your calculations.) i. Ask the user to enter the customer ID. A valid customer ID must contain 5 digits. If the user inputs an invalid customer ID the user must re-enter the account. ii. Ask the user to enter the length and the width of the picture in inches. Ask the user to enter the frame type (The user will enter ror R for Regular service and for F for Fancy service). Any invalid input must be corrected by asking the user to re- enter. Ask the user to enter 'y' or 'n' to state whether they want to add a color to the frame. Print all the entered details to the screen. vi. Calculate the amount due and print it to the screen. Sample Run: Welcome to Happy Pictures. iv. V. Please enter the Customer ID: 4672 Incorrect! Please enter it again: 46728 Please enter Please enter the length width of the picture: 10 12 Please select your frame type (for regular f for fancy): R Do you wish to color the frame? n Account Number: 46728 Frame Type: Regular Length and Width: 10 12 Your total bill for your frame comes to: 17.4 AED

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions