-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTeacher_details.java
More file actions
39 lines (26 loc) · 857 Bytes
/
Teacher_details.java
File metadata and controls
39 lines (26 loc) · 857 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 Teacher_details
{
static void add_teacher_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("TEACHING SUBJECT : ");
String subject = input_string.nextLine();
System.out.print("Class : ");
String teaching_class = input_string.nextLine();
String file_name = "teacher.txt";
Data_Base db = new Data_Base();
try
{
db.add_data(file_name,index,subject,teaching_class,name);
}
catch (Exception ex)
{
System.out.print("ERROR : "+ex);
}
}
}