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
Susan is excited to learn various safe ways to browse the Internet. She is looking for suggestions that would help her. Which ar
a_sh-v [17]

Answer:

a

Explanation:

5 0
3 years ago
QUANTO TEMPO DURA UM CURSO DE INFORMATICA COMPLETO
Arlecino [84]
That's not a complete sentence.<span />
5 0
3 years ago
Write a recursive method to form the sum of two positive integers a and b. Test your program by calling it from a main program t
77julia77 [94]

Answer:

see the code snippet below writing in Kotlin Language

Explanation:

fun main(args: Array<String>) {

   sumOfNumbers()

}

fun sumOfNumbers(): Int{

   var firstNum:Int

   var secondNum:Int

   println("Enter the value of first +ve Number")

   firstNum= Integer.valueOf(readLine())

   println("Enter the value of second +ve Number")

   secondNum= Integer.valueOf(readLine())

   var sum:Int= firstNum+secondNum

  println("The sum of $firstNum and $secondNum is $sum")

   return sum

}

5 0
3 years ago
Question 1 of 40
Novay_Z [31]

Answer:

D. Federal Work-Study

Explanation:

8 0
4 years ago
All of the following can be caused by the movement of geologic plates EXCEPT
Aleks04 [339]
I think storm surges cause fro means world "earth" so a storm surge is like a flood SO plates would cause earth quakes and stuff
8 0
4 years ago
Other questions:
  • ________ is a wireless protocol designed for transmitting data over short distances, replacing cables. ipv6 ipv4 paas bluetooth
    11·1 answer
  • What happens when you send a fax to a phone?
    9·1 answer
  • A "want" is very different than a "need'. What is a want?
    9·2 answers
  • What are motion graphics?
    9·1 answer
  • Give a big-O estimate the number of operations, where an operation is a comparison or a multiplication, used in this segment of
    10·1 answer
  • Consider whether there are additional components that could be added to the IPv4 protocol to enhance its usefulness. What are th
    15·1 answer
  • Which step is common to both creating a new document and saving a document?
    11·2 answers
  • How do I get the most points, without any effort?
    11·2 answers
  • What is the example of HTML?​
    13·1 answer
  • Select the correct answer.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!