Question: Z MYN Problem 3 (5 points) Create a file named Printer.java (remember the class name will be the same as the filename). Write a program

 Z MYN Problem 3 (5 points) Create a file named Printer.java
(remember the class name will be the same as the filename). Write

Z MYN Problem 3 (5 points) Create a file named Printer.java (remember the class name will be the same as the filename). Write a program that asks the user to enter a string that encodes a print job. The string has this format: "Count Paper Size ColorType" Count, PaperSize, and ColorType are each separated by exactly one space. The first part of the string represents the size of paper used: Paper Size (String) Cost Per Sheet (W) "A4" 50 "A5" 20 "Letter" 40 "Legal" 25 The second part of the string represents the color of the printing. This cost is added to the cost of the paper itself: Color Type (string) Cost Per Sheet (W) "Grayscale" 5 "Color" 25 V Take in the user input in the main method, but then use a method named computePrint Job that takes three parameters (count, paperSize, colorType) and returns the cost.Then call this method from your main method and print the total cost of the print job in the main method. You may assume that all user input will be valid (e.g. no invalid sizes, negative count, etc.). If the total end up with requiring a 5 won coin (e.g. 75), you should round up to the nearest unit of 10 won (e.g. 75 rounds to 80). Several example runs are given below: Enter print job info: 4 A4 Color Print job cost: 300 4 Enter print job info: 53 Legal Grayscale Print job cost: 1590 448 (sotrs) 300 Enter print job info: 40 A5 Color Print job cost: 1800

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!