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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:00
Modern businesses use different technologies to accomplish work tasks
Answers: 2
question
Computers and Technology, 22.06.2019 10:40
Program using c++ only on visual studio pig is a simple two player dice game, played with one die. the first player to reach or surpass 50 is the winner. each player takes a turn rolling the dice. they add to the pot with each roll, having to decide to roll again and increase the pot, or cash out. the risk being they could lose the amount they’ve accumulated into the pot. the rules for each player’s die roll. 1. roll the dice. a. if user rolled a 1, i. the pot gets set to zero ii. the other player goes to step 1. b. a roll of 2-6 is added to the pot. 2. user can choose to hold or roll again. a. choice roll. return to step 1. b. choice hold. i. increment player score by the pot amount. ii. pot gets set to 0. iii. second player gets to roll and goes to step 1. program requirements: ● before each opponent begins ○ output the score for the person and the computer. ○ output the opponents whose turn is beginning and ask the user to hit enter to continue. ● with each dice roll. ○ output the die value, and amount of the round pot. ○ if it’s the users roll ask if they want to roll again ( r ) or hold ( h ). your program should allow r, r, h or h as valid input. if input is anything else, ask the user again until valid input is obtained. ○ the ai will continue playing until the round pot is 20 or more. ● once a player’s score is greater or equal to 50 then they have won, it will no longer ask if they want to keep rolling the die or not. ● once there is a winner ○ score totals are output along with who the winner was. user or computer ○ player is asked if they want to play again y or n. valid input should be y, y, or n, n. ● when a new game starts the starting roll goes to the player that did not roll last. if the user rolled last in the previous game, then the computer rolls first and vice versa. when the program first begins, the player will make the first roll of the first game. development notes : ● you will need a way to roll dice in your program. the rand() function works well, but returns an integer. if we want numbers 0 – 9 we can get the value modulus 10. ● call srand() with a value to seed it. it’s common to seed it with the current computer clock, include ctime, and then call srand(time(
Answers: 1
question
Computers and Technology, 22.06.2019 19:20
Terri needs to insert a cover page into her document. where should she go to access the commands to do so? o insert tab, objects group o insert tab, illustrations group o insert tab, pages group o insert tab, media group submit
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Cloud computing service providers manage different computing resources based on the services they offer. which resources do iaas and paas providers not manage? iaas providers do not manage the for the client, whereas paas providers usually do not manage the for their clients. iaas- storage server operating system network paas- applications interafce storage vertualiation
Answers: 2
You know the right answer?
Print Job Cost Calculator (10 points) Filename: PrintJobCost. java
Write a program that asks...
Questions
question
Mathematics, 17.05.2021 19:50
question
English, 17.05.2021 19:50
question
Mathematics, 17.05.2021 19:50
question
Mathematics, 17.05.2021 19:50
question
Computers and Technology, 17.05.2021 19:50