import java.util.Scanner;.

Added on - 16 Oct 2019

  • 2

    pages

  • 247

    words

  • 110

    views

  • 0

    downloads

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(System.in);String name;double attendanceRate;int hoursWorked;System.out.println("Employee1 name:");name = scan.next();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
desklib-logo
You’re reading a preview
card-image

To View Complete Document

Become a Desklib Library Member.
Subscribe to our plans

Unlock This Document