subject

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

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

– save the file as assign2qn6xx. java. for your submission, you need to replace

xx with your name.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:00, DRock4976
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen too
Answers: 2
image
Computers and Technology, 23.06.2019 14:30, soapai
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
image
Computers and Technology, 24.06.2019 13:30, lovecats12
To move an excel worksheet tab, simply right-click on it drag and drop it double-click on it delete it
Answers: 1
image
Computers and Technology, 24.06.2019 16:50, Laylahlettiere
Develop the program incrementally: a) start by reading and displaying each line of the input file to make sure you are reading the data set correctly. b) use the split string method to extract information from each line into a list. print the list to prove that this step is working correctly. d) convert the exam scores to type int and calculate the student’s average. display those items to prove this step is working correctly. e) create a tuple containing the six items for each student (name, exam scores, exam mean). display the tuples to prove this step is working correctly. (optionally, you may want to have the exam scores in a list so your tuple is (name, scores_list, f) append each tuple to a list. display the list to prove this step is working correctly. g) use the sort list method to re-order the tuples in the list. display the list to prove this step is working correctly. h) use a for statement to display the contents of the list as a table (with appropriate formatting). i) use a for statement to calculate the average of all scores on exam #1, then display the results. note that you could have calculated this average within the first loop, but we are explicitly requiring you to do this calculation by looping though your list of tuples. j) add the logic to calculate the average of all scores on exam #2, then display the results.
Answers: 2
You know the right answer?
You have several pictures of different sizes that you would like to frame. a local picture framing s...

Questions in other subjects: