-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathTestEmployee.java
More file actions
31 lines (27 loc) · 900 Bytes
/
TestEmployee.java
File metadata and controls
31 lines (27 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import java.util.Scanner;
public class TestEmployee {
public static void main(String[] args) {
// TODO Auto-generated method stub
//Employee ram = new Employee();
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the Id");
int id = scanner.nextInt();
System.out.println("Enter the Name");
String name = scanner.next();
System.out.println("Enter the Basic Salary");
double basicSalary = scanner.nextDouble();
Employee ram = new Employee(id, name, basicSalary);
String salarySlip = ram.printSalarySlip();
System.out.println(salarySlip);
scanner.close();
// String a = new String("AMit");
// System.out.println(a);
//
// Employee ram = new Employee(1001, "Ram",9999);
//
// ram.setSalary(ram.getSalary() + 10000);
// System.out.println(ram.getSalary());
// System.out.println(ram); // ram.toString()
// //System.out.println(ram.print());
}
}