File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Student_Database_Application/src/studentdatabaseapplication Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ package studentdatabaseapplication ;
2
+
3
+ import java .util .Scanner ;
4
+
5
+ public class StudentDatabaseApp {
6
+
7
+ public static void main (String [] args ) {
8
+ // Ask how many new Students we want to add
9
+ System .out .print ("Enter number of new students to enroll: " );
10
+ Scanner sc = new Scanner (System .in );
11
+ int numOfStudents = sc .nextInt ();
12
+ Student [] students = new Student [numOfStudents ];
13
+
14
+ // Create n number of new students
15
+ for (int n = 0 ; n < numOfStudents ; n ++) {
16
+ students [n ] = new Student ();
17
+ students [n ].enroll ();
18
+ students [n ].payTuition ();
19
+ }
20
+
21
+ for (int n = 0 ; n < numOfStudents ; n ++) {
22
+ System .out .println (students [n ].toString ());
23
+ }
24
+ }
25
+
26
+ }
You can’t perform that action at this time.
0 commit comments