Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You have several pictures of different sizes that you would like to frame. A local picture framing store offers two types of frames regular and

You have several pictures of different sizes that you would like to frame. A local picture framing store offers two types of frames regular and fancy. The frames are available in white and can be ordered in any color the customer desires. Suppose that each frame is 1 inch wide. The cost of coloring the frame is $0.10 per inch. The cost of a regular frame is $0.15 per inch and the cost of a fancy frame is $0.25 per inch. 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. The customer can also choose to put crowns on the corners, which costs $0.35 per crown.

Write a program that prompts the user to input the following information and then output the cost of framing the picture: a. The length and width, in inches, of the picture. b. The type of the frame. c. Customers choice of color to color the frame. d. If the user wants to add the crowns, then the number of crowns.

Sample Run:

Welcome to XX Framing Store

--------- --------- --------- --------- --------- --------- ---------

Enter the length and width of the picture : 10 20

Please choose the type of the frame , 1 or r or R ( Regular ) ,

2 or f or F ( Fancy ): F

Enter the color to color the frame : white

Enter the number of crowns : 4

--------- --------- --------- --------- --------- --------- ---------

Amount due : $31 .30

Note:

Define constants and take inputs from the user

Use appropriate control structures such as if/else and switch.

Add comments, the source code and the screen-shot of outputs are required!!

Save the file as Assign2Qn6XX.java. For your submission, you need to replace

XX with your name.

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

Students also viewed these Databases questions