Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Java class called CalculatePay 1. For the following, store each item as a variable of the appropriate data type. Must use a different

Write a Java class called CalculatePay 1. For the following, store each item as a variable of the appropriate data type. Must use a different data type for each one.

Get the name of the user

Get the number of hours worked this week from the user

Get the hourly pay rate from the user

Get the employee type from the user, as a single character (P for part-time, F for full-time, T for temporary)

2. Calculate the total pay, and store that as another variable

3. Display the total pay to the user in this format: Hi (name) , you made $(totalPay) this week!

Where (name) is replaced with the variable you chose to store the persons name, and totalPay is replaced with the variable you chose to store the total pay

Make sure the total pay always displays 2 digits after the decimal point.

Example Output (user input is in green)

What is your name?

Bob

How many hours did you work?

40

What is your pay rate?

12.95

What type of employee are you?

F

Hi Bob, you made $518.00 this week!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions

Question

5 The mechanics of the circular flow model.

Answered: 1 week ago

Question

1 The difference between a command system and a market system.

Answered: 1 week ago

Question

4 How the market system adjusts to change and promotes progress.

Answered: 1 week ago