-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCourseMain.java
More file actions
32 lines (25 loc) · 862 Bytes
/
CourseMain.java
File metadata and controls
32 lines (25 loc) · 862 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
import java.util.Scanner;
public class CourseMain {
public CourseMain(){
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter the id Details here");
int n = sc.nextInt();
for(int i = 1; i <= n; i++){
Course c1 = new Course();
System.out.println("Enter Name");
String name = sc.next();
System.out.println("Enter ID");
int id = sc.nextInt();
System.out.println("Enter fees");
int fee = sc.nextInt();
c1.setCourseName(name);
c1.setCourseid(id);
c1.setCourseFee(fee);
new Course(id,name,fee);
System.out.println("Student: "+ i);
c1.displayCourseDetails();
}
}
}