forked from muqrock/Student_Course_Enrollment_App
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudentDatabaseApp.java
More file actions
43 lines (35 loc) · 1.21 KB
/
StudentDatabaseApp.java
File metadata and controls
43 lines (35 loc) · 1.21 KB
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
40
41
42
43
import studentdatabaseapp.Student;
import studentdatabaseapp.ConsOverload;
import studentdatabaseapp.overriding;
import java.util.Scanner;
public class StudentDatabaseApp {
public static void main (String[]args) {
//String class
char welcome[]={'W','e','l','c','o','m','e'};
//converting char array welcome[] to string welStrng
//this will print welcome
String welStrng = new String(welcome);
System.out.println("\t\t" + welStrng);
// ConsOverload file
ConsOverload a = new ConsOverload("\t\tStudent");
ConsOverload b = new ConsOverload();
a.printName();
b.printName();
// overriding file
overriding ov = new overriding();
ov.myMethod();
// Ask how many new student we want to add
System.out.print("Enter number of new students to enroll: ");
Scanner in = new Scanner(System.in);
int numOfStudents = in.nextInt();
Student[] students = new Student[numOfStudents];
// Create n number of new students
for (int n = 0; n < numOfStudents; n++) {
students[n] = new Student();
students[n].enroll();
students[n].totalpay();
students[n].payTuition();
System.out.println(students[n].toString());
}
}
}