Write a program to calculate pay for three different types of employees. The program will have the following components: • Combo box to select the type of employee. See Bagel file. • Two text fields to input the number of hours worked and pay rate. • A button to calculate the total pay. Labels where appropriate. The types of employees are: • Salaried: These employees earn $2000 plus a weekly bonus. Use a dialog box to request the weekly bonus. • Hourly: Pay = hours times rate. Volunteer: These employees do not get paid so their pay will display as 0.

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter16: Graphics
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question
3.
Write a program to calculate pay for three different types of employees. The
program will have the following components:
• Combo box to select the type of employee. See Bagel file.
• Two text fields to input the number of hours worked and pay rate.
• A button to calculate the total pay.
• Labels where appropriate.
The types of employees are:
• Salaried: These employees earn $2000 plus a weekly bonus. Use a dialog
box to request the weekly bonus.
• Hourly: Pay = hours times rate.
• Volunteer: These employees do not get paid so their pay will display as 0.
Payroll
Select an Employee Type...
Hours: 0
Rate: 0.0
Calculate Pay
Pay: $0.00
*Name the main driver class Pay and the interface panel class PayPanel.
Transcribed Image Text:3. Write a program to calculate pay for three different types of employees. The program will have the following components: • Combo box to select the type of employee. See Bagel file. • Two text fields to input the number of hours worked and pay rate. • A button to calculate the total pay. • Labels where appropriate. The types of employees are: • Salaried: These employees earn $2000 plus a weekly bonus. Use a dialog box to request the weekly bonus. • Hourly: Pay = hours times rate. • Volunteer: These employees do not get paid so their pay will display as 0. Payroll Select an Employee Type... Hours: 0 Rate: 0.0 Calculate Pay Pay: $0.00 *Name the main driver class Pay and the interface panel class PayPanel.
GUI
You will find the files needed for Problems 1 and 2 in the Module 8: Graphical User Interfaces
course content folder. The EvenOdd and Bagel files will help you with Problem
1.
Make the following changes to the Push Counter program:
Add 2 each time the button is pressed.
Change the title bar from Push Counter to Pushes x Two.
Change the button label from Push me! to Add Two.
Change the background color.
Change the size so the panel is higher than it is wide.
Change the label from Pushes: to Total =.
1.
2.
3.
4.
5.
6.
2.
Modify the Fahrenheit program so that it displays a button that when pressed causes the
conversion calculation to take place. The user will have the option of pressing Enter in
the text field or pressing the button. Have the listener that is already defined for the text
field also listen for the button push.
Transcribed Image Text:GUI You will find the files needed for Problems 1 and 2 in the Module 8: Graphical User Interfaces course content folder. The EvenOdd and Bagel files will help you with Problem 1. Make the following changes to the Push Counter program: Add 2 each time the button is pressed. Change the title bar from Push Counter to Pushes x Two. Change the button label from Push me! to Add Two. Change the background color. Change the size so the panel is higher than it is wide. Change the label from Pushes: to Total =. 1. 2. 3. 4. 5. 6. 2. Modify the Fahrenheit program so that it displays a button that when pressed causes the conversion calculation to take place. The user will have the option of pressing Enter in the text field or pressing the button. Have the listener that is already defined for the text field also listen for the button push.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Structure chart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L