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 is NOT one of the 3 technology bets we have made?
agasfer [191]

The one that is not an option of the 3 technology bets made are  Digital core and Design Thinking.

<h3>What are the 3 technology bets Genpact produced?</h3>

The digital technologies made are known to be able to create value through the accelerating processes and also by automating them.

The technology bets Genpact are:

  • Artificial Intelligence.
  • Augmented Intelligence.
  • Customer Experience.
  • Digital Transformation and AI Consulting.
  • Intelligent Automation.

Learn more about technology from

brainly.com/question/25110079

8 0
1 year ago
When it comes to making a good impression in a work setting, it does not apply to an initial contact, since both people are meet
Art [367]

Answer:

you have only seconds in which a person will accept or reject an employee or firm

Explanation:

First impression matters that's why when looking for employment with an organisation, lack of a tie for men may lead to automatic rejection. You have to be smart both intellectually and physically. Therefore, it means that you have only seconds in which a person will accept or reject an employee or firm.

4 0
3 years ago
Question 2: (a) In your own words, clearly distinguish and differentiate between Ethics in Engineering and Ethics in Computing (
zlopas [31]

Engineering ethics is not without abstraction, but in contrast with computing, it is animated by a robust and active movement concerned with the seamless identification of ethics with practice.

<h3 /><h3>What is engineering?</h3>

This is a branch of science and technology concerned with the design, building, and use of engines, machines, and structures that uses scientific principles.

Comparing ethics in engineering and ethics in computing:

  • Engineering ethics are a set of rules and guidelines. While computing ethics deals with procedures, values and practices.
  • In engineering ethics, engineers must adhere to these rules as a moral obligation to their profession While in computing ethics, the ethics govern the process of consuming computer technology.
  • Following these ethics for the two professions will NOT cause damage, but disobeying them causes damage.

Some practical examples in the computing field:

  • Avoid using the computer to harm other people such as creating a bomb or destroying other people's work.
  • Users also should not use a computer for stealing activities like breaking into a bank or company.
  • Make sure a copy of the software had been paid for by the users before it is used.

Some practical examples in the engineering field:

  • Integrity for oneself.
  • Respect for one another.
  • Pursuit of excellence and accountability.

Hence, Engineering ethics is the field of system of moral principles that apply to the practice of engineering and following them is important to the profession.

Read more about <em>engineering</em> here:

brainly.com/question/17169621

#SPJ1

7 0
2 years ago
A hollow pipe is submerged in a stream of water so that the length of the pipe is parallel to the velocity of the water. If the
Arlecino [84]

Answer:

increases by a factor of 6.

Explanation:

Let us assume that the initial cross sectional area of the pipe is A m² while the initial velocity of the water is V m/s², hence the flow rate of the water is:

Initial flow rate = area * velocity = A * V = AV m³/s

The water speed doubles (2V m/s) and the cross-sectional area of the pipe triples (3A m²), hence the volume flow rate becomes:

Final flow rate = 2V * 3A = 6AV m³/s = 6 * initial flow rate

Hence, the volume flow rate of the water passing through it increases by a factor of 6.

8 0
3 years ago
Careful planning will save time, __________, and energy while ensuring the production of a high quality product.
Svet_ta [14]
Juicers nb 345676 at that rate it will be amazing
5 0
2 years ago
Other questions:
  • The development team recently moved a new application into production for the accounting department. After this occurred, the Ch
    6·1 answer
  • A cylindrical bar of steel 10.1 mm (0.3976 in.) in diameter is to be deformed elastically by application of a force along the ba
    15·1 answer
  • How does the map scale help to interpret the map?
    14·2 answers
  • Consider a vortex filament of strength in the shape of a closed circular loop of radius R. Obtain an expression for the velocity
    10·1 answer
  • When a user process is interrupted or causes a processor exception, the x86 hardware switches the stack pointer to a kernel stac
    13·1 answer
  • The pressure intensity at a point in a fluid is equal in all directions a.true b.false​
    12·1 answer
  • Which of the following justifies the need for an already-certified engineer to continue to take classes?
    15·1 answer
  • Cite another example of information technology companies pushing the boundaries of privacy issues; apologizing, and then pushing
    9·1 answer
  • The driver should be able to see the ground within _____ to the front?
    14·1 answer
  • the left rear brake drum is scored, but the right rear drum looks as good as new. technician a says the left-side drum should be
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!