1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mumz [18]
3 years ago
14

Print Job Cost Calculator (10 points)

Computers and Technology
1 answer:
Ad libitum [116K]3 years ago
8 0

Answer: Provided in the explanation section

Explanation:

Provided is the code  to run this program

Source Code:

import java.util.Scanner;

class PrintJobCost

{

  public static void main(String[] args) {

      Scanner input=new Scanner(System.in);

      System.out.print("Enter print job info:");

      String info=input.nextLine();

      String size="",type="";

      int count=0,i=0,len=info.length();

      double cost=0.0;

      while(info.charAt(i)!=' '){

          size=size+info.charAt(i);  

          i++;

      }

      i++;

      while(info.charAt(i)!=' '){

          type=type+info.charAt(i);

          i++;

      }

      i++;

      while(i<len){

          count=count*10+Integer.parseInt(String.valueOf(info.charAt(i)));

          i++;

      }

      if(size.equals("Letter"))

          cost=cost+0.05;

      else if(size.equals("Legal"))

          cost=cost+0.06;

      else if(size.equals("A4"))

          cost=cost+0.055;

      else if(size.equals("A5"))

          cost=cost+0.04;

      if(type.equals("Grayscale"))

          cost=cost+0.01;

      else if(type.equals("Colored"))

          cost=cost+0.10;

      cost=cost*count;

      System.out.printf("print job Cost:$ %.2f\n",cost);

  }

}

cheers i hope this helped !!!

You might be interested in
You defined a class and saved it as shoe.py.
alexandr1967 [171]

Answer:

Import shoeClass from

Explanation:

7 0
2 years ago
Read 2 more answers
Define Turbo C++ and how is the use of Turbo C++.?
anyanavicka [17]

Answer:

Turbo C++ is a Compiler and Integrated development Environment (IDE) and Computer language

Explanation:

  1. Turbo C++ is a IDE which is used for writing the programs.
  2. This editor is used to create the source file, compile and run the source file and then execute it

6 0
3 years ago
In python 3.17 LAB: Convert to dollars
krok68 [10]

To convert the inputs to dollars and cents, we make use of a combination of multiplication and addition.

The program written in Python where comments are used to explain each line is as follows:

<em />

<em>#This gets input for the number of quarters</em>

quarters = int(input("Quarters: "))

<em>#This gets input for the number of dimes</em>

dimes = int(input("Dimes: "))

<em>#This gets input for the number of nickels</em>

nickels= int(input("Nickels: "))

<em>#This gets input for the number of pennies</em>

pennies= int(input("Pennies: "))

<em>#This converts the amount to dollars and cents</em>

dollars = quarters * 0.25 + dimes * 0.10 + nickels * 0.05 + pennies * 0.01

<em>#This prints the amount to 2 decimal places</em>

print("Amount ${:.2f}".format(dollars))

Read more about Python programs at:

brainly.com/question/22841107

7 0
2 years ago
Write 5 chart types​
Lemur [1.5K]

Answer:

pie chart

line chart

area chart

bar charts

histogram

scatter plot

6 0
3 years ago
Computer has brought radical change in every field​
tigry1 [53]

Answer:

Yes it has brought change in every field

Explanation:

3 0
3 years ago
Other questions:
  • I need help please?!!!
    15·1 answer
  • Discuss the differences between permanent internal memory and volatile internal memory.
    14·1 answer
  • Select a classification for File2 so that: Alice can read and write to File2 Bob and Charlie can write to File2, but can't read
    6·1 answer
  • To change the way a slide moves from one slide to the next, what tab should be selected?
    12·1 answer
  • Write a python program that requests a positive integer from the user, determines if it is a composite, a prime or neither prime
    8·1 answer
  • Whats yall favv scary movie
    11·1 answer
  • Write code which takes two inputs from the user, a number of sides followed by a side length, then creates a regular polygon wit
    10·2 answers
  • Please tell fast plzzzzzz​
    5·2 answers
  • Which tab on the Ribbon contains the command to print a publication?
    10·1 answer
  • a value-returning method must specify as its return type in the method header. question 18 options: a) an int b) a double c) a b
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!