Need help writing a payroll program in java for school.
I need to have the program set up to recieve input from the user for a name, the wage, and the hours worked. There needs to be a total pay calculation and it needs to display that total in monetary format and the employee's name. Here is what I have so far. I'm new to Java and I'm having a hard time learning in an online environment, so any help would be appreciated:


package payroll_program;
import java.util.Scanner;

        public class Main {
            public static void main(String[] args) {

            Scanner input = new Scanner( System.in );
            int hours;
            int rate;
            int name;
            int total_pay = (hours * rate);
    
        System.out.println("Please enter employee name");            //This asks user to enter the employee's name
            name = input.nextInt();
        System.out.println("Please enter hourly rate");              //This asks the user to enter the hourly wage for that employee
            rate = input.nextInt();
        System.out.println("Please enter hours worked");             //This asks the user to input how many hours the employee worked for that week.
            hours = input.nextInt();
        System.out.println("Employee's total pay for this week");    //This tells the user that the following displayed information is the employee's 
            total_pay = hours * rate;

            System.out.printf( "The total pay for", (name) "is ", (total_pay)); 
    }

}

Need help writing a payroll program in java for school.
===

I need to have the program set up to recieve input from the user for a name, the wage, and the hours worked. There needs to be a total pay calculation and it needs to display that total in monetary format and the employee's name. Here is what I have so far. I'm new to Java and I'm having a hard time learning in an online environment, so any help would be appreciated:


package payroll_program;
import java.util.Scanner;

        public class Main {
            public static void main(String[] args) {

            Scanner input = new Scanner( System.in );
            int hours;
            int rate;
            int name;
            int total_pay = (hours * rate);
    
        System.out.println("Please enter employee name");            //This asks user to enter the employee's name
            name = input.nextInt();
        System.out.println("Please enter hourly rate");              //This asks the user to enter the hourly wage for that employee
            rate = input.nextInt();
        System.out.println("Please enter hours worked");             //This asks the user to input how many hours the employee worked for that week.
            hours = input.nextInt();
        System.out.println("Employee's total pay for this week");    //This tells the user that the following displayed information is the employee's 
            total_pay = hours * rate;

            System.out.printf( "The total pay for", (name) "is ", (total_pay)); 
    }

}
