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
solmaris [256]
3 years ago
10

1. Copy the file Pay.java (see Code Listing 1.1) from the Student CD or as directed by your instructor. 2. Open the file in your

Java Integrated Development Environment (IDE) or a text editor as directed by your instructor. Examine the file, and compare it with the detailed version of the pseudocode in step number 3, section 1.6 of the textbook. Notice that the pseudocode does not include every line of code. The program code includes identifier declarations and a statement that is needed to enable Java to read from the keyboard. These are not part of actually completing the task of calculating pay, so they are not included in the pseudocode. The only important difference between the example pseudocode and the Java code is in the calculation. Below is the detailed pseudocode from the example, but without the calculation part. You need to fill in lines that tell in English what the calculation part of Pay.java is doing.
Engineering
1 answer:
Mrac [35]3 years ago
5 0

Answer:

Code Listing 1.1 (Pay.java)

import java.util.Scanner; // Needed for the Scanner class

/**

This program calculates the user's gross pay.

*/

public class Pay

{

public static void main(String[] args)

{

// Create a Scanner object to read from the keyboard. Scanner keyboard = new Scanner(System.in);

// Identifier declarations

double hours; // Number of hours worked

double rate; // Hourly pay rate double pay; // Gross pay

// Display prompts and get input. System.out.print("How many hours did you work? "); hours = keyboard.nextDouble();

System.out.print("How much are you paid per hour? ");

rate = keyboard.nextDouble();

// Perform the calculations. if(hours <= 40)

pay = hours * rate;

else

pay = (hours - 40) * (1.5 * rate) + 40 * rate;

// Display results. System.out.println("You earned $" + pay);

}

}

Code Listing 1.2 (SalesTax.java)

import java.util.Scanner; // Needed for the Scanner class

/**

This program calculates the total price which includes

sales tax.

*/

public class SalesTax

{

public static void main(String[] args)

{

// Identifier declarations final double TAX_RATE = 0.055; double price;

double tax

double total; String item;

// Create a Scanner object to read from the keyboard. Scanner keyboard = new Scanner(System.in);

// Display prompts and get input. System.out.print("Item description: "); item = keyboard.nextLine(); System.out.print("Item price: $");

price = keyboard.nextDouble();

// Perform the calculations. tax = price + TAX_RATE;

totl = price * tax;

// Display the results. System.out.print(item + "  $"); System.out.println(price); System.out.print("Tax $"); System.out.println(tax); System.out.print("Total $"); System.out.println(total);

}

}

You might be interested in
you have a permanent magnet whit remanent induction. than you cut a piec of that magnet. if you put that piece back into permane
ELEN [110]
Yes, it will. The induction will be the same as long as it’s put back together.
5 0
3 years ago
Technician A says high resistance causes an increase in current flow. Technician B says a higher than
Kryger [21]

The correct statement is: a higher than a normal voltage drop could indicate high resistance. Technician B is correct.

<h3>Ohm's law</h3>

Ohm's law states that the current flowing through a metallic conductor is directly proportional to the voltage provided all physical conditions are constant. Mathematically, it is expressed as

V = IR

Where

V is the potential difference

I is the current

R is the resistance

<h3>Technician A</h3>

High resistance causes an increase in current flow

V = IR

Divide both side by I

R = V / I

Thus, technician A is wrong as high resistance suggest low current flow

<h3>Technician B</h3>

Higher than normal voltage drop could indicate high resistance

V = IR

Thus, technician B is correct as high voltage indicates high resistance

<h3>Conclusion </h3>

From the above illustration, we can see that technician B is correct

Learn more about Ohm's law:

brainly.com/question/796939

8 0
2 years ago
What are the indicators of ineffective systems engineering?
liberstina [14]

Answer:

Indicators for ineffective system engineering are as follows

1.Requirement trends

2.System definition change backlog trends

3.interface trends

4.Requirement validation trends

5.Requirement verification trends

6.Work product approval trends

7.Review action closure trends

8.Risk exposure trends

9.Risk handling trends

10.Technology maturity trends

11.Technical measurement trends

12.System engineering skills trends

13.Process compliance trends

7 0
3 years ago
Explain why the scenario below describes a team of mechanical engineers.
babymother [125]

Explanation:

because mechanical engineers fix air conditioners cars and other stuffs

5 0
2 years ago
Read 2 more answers
two pints of ethyl ether evaporate over a period of 1,5 hours. what is the air flow necessary to remain at 10% or less of ethyl
lesya692 [45]

The air flow necessary to remain at the lower explosive level is 4515. 04cfm

<h3>How to solve for the rate of air flow</h3>

First we have to find the rate of emission. This is solved as

2pints/1.5 x 1min

= 2/1.5x60

We have the following details

SG = 0.71

LEL = 1.9%

B = 10% = 0.1 a constant

The molecular weight is given as 74.12

Then we would have Q as

403*100*0.2222 / 74.12 * 0.71 * 0.1

= Q = 4515. 04

Hence we can conclude that the air flow necessary to remain at the lower explosive level is 4515. 04cfm

Read more on the rate of air flow on brainly.com/question/13289839

#SPJ1

7 0
1 year ago
Other questions:
  • Describe the meaning of the different symbols and abbreviations found on the drawings/documents that they use (such as BS8888, s
    12·1 answer
  • How did Atlantis benefit from lessons learned in construction of earlier orbiters?
    9·1 answer
  • If you were driving the blue Prius in the situation pictured above, explain why the red Mustang should be given right-of-way at
    13·1 answer
  • A simply supported wood roof beam is loaded with single point dead and roof live loads applied at midspan (PD = 400 lb, PLr = 16
    9·1 answer
  • Can you screen record on WOW Presents Plus on iPhone?
    12·1 answer
  • Why carbon is not used as a semiconductor material​
    9·1 answer
  • Calculate the number of vacancies per cubic meter at 1000∘C for a metal that has an energy for vacancy formation of 1.22 eV/atom
    14·1 answer
  • What invention of the Middle Ages contributed to making books easily available?
    15·1 answer
  • Why is electricity considered a secondary source of energy
    6·1 answer
  • name the three exposure techniques in photolithography. what are the alternatives to photolithography in ic processing?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!