Question: import java.util.Scanner; public class ManualCostCalculator { public static void main ( String [ ] args ) { final double PER _ PAGE _ BW =

import java.util.Scanner;
public class ManualCostCalculator {
public static void main(String[] args){
final double PER_PAGE_BW =2.5;
final double PER_PAGE_COLOR =0.25;
final double PAGE_WEIGHT =0.2;
int totPageCount =0;
int colPageCount =0;
double covCost =0.0;
double prinCost =0.0;
double colCost =0.0;
double weight =0.0;
double mailCost =0.0;
Scanner input = new Scanner(System.in);
System.out.println("Program to calculate training manual costs
");
System.out.println("Enter the number of black and white pages:");
totPageCount = input.nextInt();
System.out.println("Enter the number of color pages:");
colPageCount = input.nextInt();
System.out.println("
There are "+(totPageCount + colPageCount)+" pages in the training manual
");
System.out.print("Enter the cover cost:");
covCost = input.nextDouble();
System.out.println("
Enter the budget for training manuals:");
double budget = input.nextDouble();
prinCost = totPageCount * PER_PAGE_BW + colPageCount * PER_PAGE_COLOR;
colCost = colPageCount * PER_PAGE_COLOR;
weight =(totPageCount + colPageCount)* PAGE_WEIGHT;
System.out.println("
For one manual:");
System.out.printf(" Black & white printing cost per page is %.1f%n", PER_PAGE_BW);
System.out.printf(" Color printing cost per page is %.2f%n", PER_PAGE_COLOR);
double totalManualCost = prinCost + colCost + covCost;
System.out.printf("Total printing cost per manual with cover is %.2f%n", totalManualCost);
}
}

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!