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
An ipv4 address in the range 169.254.0.1 through 169.254.255.254 indicates a problem with what type of service
DENIUS [597]

Dynamic Host Configuration Protocol, also known as DHCP.

3 0
2 years ago
Which of the following is a preferable method to secure wireless access in a SOHO?
NARA [144]
Use a Ghost program follow throught with 2hyttlg5:6\:56
6 0
3 years ago
Two systems are connected by a router. Both systems and the router have transmission rates of 1,000bps. Each link has a propagat
Lisa [10]

Answer:

Two systems are connected by a router. Both systems and the router have transmission rates of 1,000bps. Each link has a propagation delay of 10ms. Also, it takes router 2ms in order to process the packet (e.g. decide where to forward it). Suppose the first system wants to send a 10,000 bit packet to the second system. How long will it take before receiver system receives the entire packet.

Transmission time for first Router = 10,000 bits / 1000 bps = 10 seconds

Receiving time for seond route r= 10,000 bits / 1000 bps = 10 seconds

Propagation delay = 10ms = .01 seconds x 2 for two delays = .02 seconds

First router 2ms to process = .002 seconds

Add all the times together and we get 20.022 seconds which is the same as or 20 seconds and 22 ms

4 0
2 years ago
Which Excel file extension stores automated steps for repetitive tasks?
Marianna [84]

Excel Macros, or .xlsm, stores automated steps for repetitive tasks.

4 0
2 years ago
Read 2 more answers
Using the find and replace tool would be most appropriate when
mafiozo [28]

A. Changing the company name when the same letter is sent to different companies

The find and replace tool is meant to help replace all instances of a certain piece of text with a different piece of text.

For example, if a letter was sent to Company A, the find and replace tool could change every time the letter says “Company A” and make it say “Company B” instead so the same letter could be sent to Company B.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Assume the following variable definitions int a = 5, b = 12; double x = 3.4, z = 9.1. What are the values of the following expre
    7·1 answer
  • What do you call a named collection of data stored on a disk?
    15·1 answer
  • Your friend’s parents are worried about going over their budget for the month. Which expense would you suggest is NOT a need?
    10·2 answers
  • In this context, the word “session” refers to _____.
    5·2 answers
  • A noisy signal has been uploaded to D2L in the files fft_signal.mat and fft_signal.txt.Write a program to estimate the power spe
    10·1 answer
  • The changing of values for an object through a system is represented by the _____. (Points : 6) communication diagram
    14·1 answer
  • Jane is creating a slide that will have a large heading and number of bullet points below it. What slide format should she use?
    12·1 answer
  • Iman has 48 months to save $18,000, the maximum amount he estimates his first year of college will cost. He does not want to dep
    7·2 answers
  • Which command would you use to swap the words hither and yon on any line with any number of words between them? (You need not wo
    5·1 answer
  • Write a C# program named ProjectedRaises that includes a named constant representing next year’s anticipated 4 percent raise for
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!