subject

Print Job Cost Calculator (10 points) Filename: PrintJobCost. java
Write a program that asks the user to enter a string that encodes a print job. The string has this format:
"Papersize ColorType Count"
PaperSize, colorType and count are separated by exactly one space.
The first part of the string represents the size of the paper used:
Paper Size (string) Cost per Sheet ($)
"Letter" 0.05
The second part of the string represents the color of the printing. This cost is added to the cost of the paper itself
Printing Type (string) Cost per Sheet($)
"Grayscale" 0.01
"Colored" 0.10
The program computes and prints the total cost of the current printing job to two decimal places to the right of the decimal point.
Note: You may assume that all function arguments will be valid (e. g., no negative values, invalid paper sizes, etc.)
Several example runs are given below.
t Enter print job info: Legal Grayscale 44 Print job cost: $3.08 C Enter print job info: A4 Colored 4 Print job cost: $0.62 t Enter print job info: Letter Grayscale 32 Print job cost: $1.9

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 19:30, wilkinsonei4069
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a, b] se pot scrie ca produs de două numere prime? “.
Answers: 1
image
Computers and Technology, 24.06.2019 00:30, louie8656
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
image
Computers and Technology, 24.06.2019 17:40, finedock
Anewly established internet company with 40 employees needs your advice. they are looking for a collaboration tool and have narrowed their choices to gotomeeting, webex, and my web conferences. after reading the information presented in this chapter and other sources, prepare a two- page document ( double spaced) that includes two advantages and two disadvantages of each tool. which one is your final recommendation? why did you choose that tool over the other two?
Answers: 3
image
Computers and Technology, 25.06.2019 05:00, Kadyn5
Carmina works at a fast-food restaurant. during the slow afternoon hours, carmina always find projects to keep her busy, like washing all the trays or deep-cleaning the drive-thru area. what workplace habit does carmina show by doing this? efficiency initiative interpersonal skills problem solving
Answers: 1
You know the right answer?
Print Job Cost Calculator (10 points) Filename: PrintJobCost. java
Write a program that asks...

Questions in other subjects:

Konu
Mathematics, 25.10.2019 15:43