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]
4 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]4 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
A 3 m aluminum pole is kept at a residential site for construction
Aliun [14]

Answer:

I don't know sorry

Explanation:

5 0
3 years ago
Sketch the asymptotes of the Bode plot magnitude and phase for the open-loop transfer ()=100(S+1)/((S+10)(S+100)) Use MATLAB to
Salsk061 [2.6K]

The asymptotes of the open loop transfer are:

  • Horizontal: y = 0
  • Vertical: x = -10 and x = -100

<h3>How to plot the asymptotes?</h3>

The open loop transfer function is given as:

f(s) = 100(s + 1)/((s + 10)(s + 100))

Set the numerator of the function to 0.

So, we have:

f(s) = 0/((s + 10)(s + 100))

Evaluate

f(s) = 0

This means that, the vertical asymptote is y = 0

Set the denominator of the function to 0.

(s + 10)(s + 100)  0

Split

s + 10 = 0 and s + 100 = 0

Solve for s

s = -10 and s = -100

This means that, the horizontal asymptotes are s = -10 and s = -100

See attachment for the graph of the asymptotes

Read more about asymptotes at:

brainly.com/question/4084552

#SPJ1

6 0
2 years ago
A study of online dating found that when including emoticons in their profiles, response rates for female users _______ by _____
Dvinal [7]

Answer:

Increased, 5%

Explanation:

Recent studies conducted on online dating sites established that the response of female users increased by 5% when emotions are in their profiles even as for male users' response also increased by 8%. Another study also revealed that those who have never used online dating sites and/or mobile dating apps believe that people who use dating apps are desperate.

8 0
3 years ago
Air flows through a device such that the stagnation pressure is 0.4 MPa, the stagnation temperature is 400°C, and the velocity i
RoseWind [281]

To solve this problem it is necessary to apply the concepts related to temperature stagnation and adiabatic pressure in a system.

The stagnation temperature can be defined as

T_0 = T+\frac{V^2}{2c_p}

Where

T = Static temperature

V = Velocity of Fluid

c_p = Specific Heat

Re-arrange to find the static temperature we have that

T = T_0 - \frac{V^2}{2c_p}

T = 673.15-(\frac{528}{2*1.005})(\frac{1}{1000})

T = 672.88K

Now the pressure of helium by using the Adiabatic pressure temperature is

P = P_0 (\frac{T}{T_0})^{k/(k-1)}

Where,

P_0= Stagnation pressure of the fluid

k = Specific heat ratio

Replacing we have that

P = 0.4 (\frac{672.88}{673.15})^{1.4/(1.4-1)}

P = 0.399Mpa

Therefore the static temperature of air at given conditions is 72.88K and the static pressure is 0.399Mpa

<em>Note: I took the exactly temperature of 400 ° C the equivalent of 673.15K. The approach given in the 600K statement could be inaccurate.</em>

3 0
3 years ago
The first thing you are going to create is a logical one bit full adder in continuous assignment verilog. You can only use logic
IgorC [24]

Answer:

See Explaination

Explanation:

// use the `timescale directive which u have used in ur testbench here

module FA1(a,b,cin,s,cout);

input a,b,cin;

output s,cout;

wire s1,c1,c2;

assign s1= #4 a ^ b;

assign s= #4 s1 ^ cin;

assign c1= #2 a & b;

assign c2= #2 s1 & cin;

assign cout= #3 c1 | c2;

endmodule

5 0
3 years ago
Other questions:
  • Air at 293k and 1atm flow over a flat plate at 5m/s. The plate is 5m wide and 6m long. (a) Determine the boundary layer thicknes
    14·1 answer
  • All of the following statements are true EXCEPT: A) air should be let out of a tire when it is hot. B) each change in outside te
    11·1 answer
  • 5. Switch a in the circuit has been open for a long time and switch b has been closed for a long time. Switch a is closed at t =
    13·1 answer
  • Write a program to sort the student’s names (ascending order), calculate students’ average test scores and letter grades (Use th
    13·1 answer
  • websites, newsgroups, email lists, or other publicly available electronic resources that can help you learn more about the trend
    14·2 answers
  • In the pressure filled driving environment, handicapping yourself by drinking and driving is not a good choice.
    9·1 answer
  • What is engineering?
    13·1 answer
  • If an improvement creates no significant change in a product’s performance, then it is a(n) design improvement.
    11·2 answers
  • Sketches are a very efficient way to share ideas.<br> True<br> False
    13·2 answers
  • The oxygen consumption of an activated sludge plant is 60 g O2/L.d for the degradation of
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!