-
Notifications
You must be signed in to change notification settings - Fork 0
/
Employee.java
39 lines (30 loc) · 1.07 KB
/
Employee.java
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
32
33
34
35
36
37
38
39
import java.util.Scanner;
import java.util.UUID;
public class Employee {
int age;
String name,dep,shrm_name,id;
public void setDetails(){
System.out.println();
Scanner s = new Scanner(System.in);
System.out.println("Kindly enter the details");
UUID uuidd = UUID.randomUUID();
id = uuidd.toString();
System.out.print("EMPLOYEE NAME : ");
name = s.nextLine();
System.out.print("DEPARTMENT : ");
dep = s.next();
System.out.print("SHOWROOM NAME : ");
shrm_name = s.next();
System.out.print("AGE : ");
age= s.nextInt();
System.out.println();
}
public void getDetails(){
System.out.println("EMPLOYEE ID : "+id);
System.out.println("EMPLOYEE NAME : "+name);
System.out.println("AGE : "+age);
System.out.println("DEPARTMENT : "+dep);
System.out.println("SHOWROOM NAME : "+shrm_name);
System.out.println();
}
}