Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Here is a an example. A good 3 module structure will be needed in this one howev

ID: 3603759 • Letter: H

Question

Here is a an example. A good 3 module structure will be needed in this one however that is stated and thank you.

The MoneyNow Finance Company needs to update their monthly credit card billing process. Use three module that you develop and if's approach to create this program In the main module declare global variables. Prompt users for user information such as name, the balance, total purchases, etc. There should be a module to determine finance charge and interest. The output module should indicate the appropriate billing information such as finance charges, interest, and the new balance. . . . If the amount subject to finance charge is $250.00 or more, interest must be calculated at 1.5 percent. If the amount subject to finance charge is less than $250.00, interest is calculated at 1 percent.

Explanation / Answer

The WageCalcu.java

public class WageCalcu
{
private String employeeName;
private int hours;
private double rate, pay;

public void setEmployeeName ( String name )
{
employeeName = name;
}
public String getEmployeeName()
{
return employeeName;
}
public double calculatePay( int hours, double rate )
{
if ( hours > 40 )
{
int extraHours = hours - 40;
pay = ( 40 * rate ) + ( extraHours * rate );
}
else pay = hours * rate;

return pay;
}
public void displayEmployee()
{
System.out.printf( "Employee's name: %s", getEmployeeName() );
System.out.printf( " Gross Salary: ", + pay );
}
}

The Employee.java

import java.util.Scanner;
public class Employee
{   
public static void main(String[] args)
{
Scanner input = new Scanner( System.in);
WageCalcu employee = new WageCalcu();

System.out.print( "Enter Employee %s name: " );
String name = input.nextLine();
employee.setEmployeeName( name );

System.out.print( "Enter how many hours worked: " );
int hours = input.nextInt();

System.out.print( "Enter hourly rate: " );
double rate = input.nextInt();

employee.calculatePay( hours, rate );
employee.displayEmployee();

System.out.println();

}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote