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
Which of the following procedures best applies to assessing the embodied energy of a building?
galina1969 [7]

analyzing building materials???????????? but i can try i think it is analyzing the materials of the building

5 0
2 years ago
Consider a dip-coating process where a very long (assume infinitely long) wire(solid) with radius, ri, is being pulled verticall
Gekata [30.6K]

Answer:

See explaination and attachment.

Explanation:

Navier-Stokes equation is to momentum what the continuity equation is to conservation of mass. It simply enforces F=ma in an Eulerian frame.

The starting point of the Navier-Stokes equations is the equilibrium equation.

The first key step is to partition the stress in the equations into hydrostatic (pressure) and deviatoric constituents.

The second step is to relate the deviatoric stress to viscosity in the fluid.

The final step is to impose any special cases of interest, usually incompressibility.

Please kindly check attachment for step by step solution.

6 0
3 years ago
Multiple Choice
Charra [1.4K]

Answer:

I guess A number is right

7 0
2 years ago
Consider CO at 500 K and 1000 kPa at an initial state that expands to a final pressure of 200 kPa in an isentropic manner. Repor
REY [17]

Answer:

T_2=315.69k

Explanation:

Initial Temperature T_1=500K

Initial Pressure P_1=1000kPa

Final Pressure P_2=200kPa

Generally the gas equation is mathematically given by

\frac{T_2}{T_1}=\frac{P_2}{P_1}^{\frac{n-1}{n}}

Where

n for CO=1.4

Therefore

\frac{T_2}{500}=\frac{200}{1000}^{\frac{1.4-1}{1.4}}

T_2=315.69k

7 0
3 years ago
If OSHA determines that an employer's response to a non-formal complaint is adequate, what options does the employee filing the
Anuta_ua [19.1K]
Fill it out without telling ur employer as that may cause backlash and have an osha certified employee come check out ur work or job site
4 0
3 years ago
Other questions:
  • A 55-μF capacitor has energy ω (t) = 10 cos2 377t J and consider a positive v(t). Determine the current through the capacitor.
    12·1 answer
  • With increases in magnification, which of the following occur? a. The field of view decreases. b. The ambient illumination decre
    9·1 answer
  • A steam power plant operates on an ideal reheat- regenerative Rankine cycle and has a net power output of 80 MW. Steam enters th
    10·1 answer
  • What are supercapacitors ?
    13·2 answers
  • Which one of the following is a list of devices from least efficient to most efficient
    9·1 answer
  • ____________ is the range of all the colors created by different amounts of light.
    8·2 answers
  • Steep safety ramps are built beside mountain highway to enable vehichles with fedective brakes to stop safely. a truck enters a
    14·1 answer
  • Technician a says that diesel engines can produce more power because air in fuel or not mix during the intake stroke. Technician
    9·1 answer
  • Hello , how are yall:))))
    10·2 answers
  • A plant has ten machines and currently operates two 8-hr shift per day, 5 days per week, 50 weeks per year. the ten machines pro
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!