PayrollGUI Program
Description
This is the same program as the Payroll program in terms of the program logic.The difference is that it uses the JOptionPane's input dialog box to input data items and the message dialog box to output the result.
Associated Concepts:
JOptionPane input and output dialog boxes
Parse String objects to numerical values
String.format() method
Parse String objects to numerical values
String.format() method
Algorithm:
Declare variables to store name, hours worked, hourly rate,
and weekly pay
Read data values from the JOptionPane's input dialog box and store them into variables
Parse String objects to numerical values.
Calculate the weekly pay
Use String.format() method to format decimal values
Print the payroll report using the JOptionPane's message dialog box
Read data values from the JOptionPane's input dialog box and store them into variables
Parse String objects to numerical values.
Calculate the weekly pay
Use String.format() method to format decimal values
Print the payroll report using the JOptionPane's message dialog box