Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Change the following code using JOptionPane header instead of Scanner. import java.util.Scanner; public class PayrollTest { public static void main(String[] args) { Scanner sc1=new Scanner(System.in);

Change the following code using JOptionPane header instead of Scanner.

import java.util.Scanner;

public class PayrollTest {

public static void main(String[] args) { Scanner sc1=new Scanner(System.in); Scanner sc=new Scanner(System.in); while(true) { System.out.print("Enter the Name of an Employee ::"); String name=sc.nextLine(); System.out.print("Enter the Employee ID ::"); int id=sc1.nextInt(); System.out.print("No of Hours Employee Worked ::"); int noOfHours=sc1.nextInt(); System.out.print("Hourly Pay Rate for an Employee ::"); int payRate=sc1.nextInt(); Payroll pr=new Payroll(name,id,noOfHours,payRate); if(pr.count==0) {continue;} else { System.out.println(pr.toString()); System.out.println("* PROGRAM EXIT *");break;} }

}

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

L A -r- P[N]

Answered: 1 week ago