Have to use Java program.
Program output have to came out.
Code Listing 2-29 (Payroll .java) 1 import java util. Scanner Needed for the Scanner class 4 This program demonstrates the Scanner class. 7 public class Payroll 9 public static void main (String[] args) To hold a name string name 11 Hours worked int hours. 12 Hourly pay rate double pay Rate; double gross Pay, Gross pay 14 Create a Scanner object to read input. Scanner keyboard new Scanner (system. in) 18 Get the user’s name. 19 System. out print “What is your name? 20 name keyboard next Line Get the number of hours worked this week. system. out.print (“How many hours did you work this week? 24 hours keyboard. next Int 25 26 Get the user’s hourly pay rate. 27 system out.print (“What is your hourly pay rate? pay Rate keyboard. next Double 29 30 Calculate the gross pay. 31 pay Rate hours gross Pay 32