PayrollWithMethodLoop Program
Description
This program is the enhanced version of the previous program.In the main() method, it uses a loop to accept the user input and call the methods until the user chooses not to.
Associated Concepts:
Method
Global constants
Calling methods in a loop
Global constants
Calling methods in a loop
Algorithm:
Define global constants so they are accessible by all methods
in the program.
main method:
Write method definitions
main method:
Declare local variables
do ... while loop:
input data from the keyboard
Call calculatePayroll method and pass arguments to get the weekly pay
Call printPayroll method and pass arguments to print the payroll report
Input "Yes" or "No" from the user to determine if the loop should continue to execute.
do ... while loop:
input data from the keyboard
Call calculatePayroll method and pass arguments to get the weekly pay
Call printPayroll method and pass arguments to print the payroll report
Input "Yes" or "No" from the user to determine if the loop should continue to execute.
Write method definitions