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
Which is a good technique for effectively proofreading your presentation?
laiz [17]
Read it backwords. it helps look for spelling errors.
7 0
3 years ago
Numeric data is stored in what for direct processing
Ede4ka [16]
A string variables??? I'm not sure does this have any multiple choice 
3 0
3 years ago
Define operating system?explain the types of operating system on the basis of use.​
GalinKa [24]

Answer:

An operating system is a software that helps the any computers basic needs or functions.  For example, the windows on a computer is a operating system.

Explanation:

4 0
2 years ago
Create an Entity-Relationship Diagram with the following requirements.
melamori03 [73]

Answer:

idk

Explanation:

6 0
3 years ago
Given the following output from /etc/fstab, which filesystems will be automatically checked on boot by the fsck command? [BEGIN
leva [86]

Answer:

Details below

Explanation:

From the following output we will get: /, /dev/pts, and /dev/shm while fsck is running automatically at boot for all filesystems

6 0
3 years ago
Other questions:
  • Use the image below to answer this question.
    14·1 answer
  • What is the output after the following code executes?
    14·1 answer
  • What lie does E.D. tell to keep the musical from being canceled? There is a television crew coming to do a story on it. Jake wil
    6·1 answer
  • When is the bond between the actin and myosin head is broken? when an ATP molecule binds to the myosin head when an ATP molecule
    6·1 answer
  • Select the correct answer from each drop-down menu.
    7·2 answers
  • Electricity fact topic
    10·2 answers
  • What can you do to help create a safe online environment?
    8·2 answers
  • 3.26 LAB: Leap Year A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate a
    15·2 answers
  • Software and technology that allow people to work together on a task are known as
    8·2 answers
  • Data type can only be true or false <br><br> Answer: Bool
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!