import java.util.Scanner;.

Added on - 16 Oct 2019

  • 2


  • 247


  • 219


  • 0


Trusted by +2 million users,
1000+ happy students everyday
Showing pages 1 to 1 of 2 pages
import java.util.Scanner;public class EmployeeApp{//-----------------------------------------------------------------// Read input//-----------------------------------------------------------------public static void main (String[] args){Scanner scan = new Scanner(;String name;double attendanceRate;int hoursWorked;System.out.println("Employee1 name:");name =;System.out.println("Employee1 attendance rate:");attendanceRate = scan.nextDouble();System.out.println("Employee1 hours worked:");hoursWorked = scan.nextInt();//To-Do: Passing the user provided data (name, attendanceRate, hoursWorked) to the Employeeconstructor and create an employee object//For example,//Employee emp1 = new Employee(name, attendanceRate, hoursWorked);//To-Do: We need one more employee. So, repear the above steps (line 17-28) one more time
You’re reading a preview
Preview Documents

To View Complete Document

Click the button to download
Subscribe to our plans

Download This Document