-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOfficer_details.java
More file actions
39 lines (26 loc) · 840 Bytes
/
Officer_details.java
File metadata and controls
39 lines (26 loc) · 840 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
32
33
34
35
36
37
38
39
import java.util.Scanner;
public class Officer_details
{
static void add_officer_details()
{
Scanner input_string = new Scanner(System.in);
System.out.print("NAME : ");
String name = input_string.nextLine();
Generate_ID id = new Generate_ID();
String index = id.generate_Id();
System.out.print("GRADE : ");
String grade = input_string.nextLine();
System.out.print("Mobile Number : ");
String mobile_no = input_string.nextLine();
String file_name = "officer.txt";
Data_Base db = new Data_Base();
try
{
db.add_data(file_name,index,grade,mobile_no,name);
}
catch (Exception ex)
{
System.out.print("ERROR : "+ex);
}
}
}