Student Java

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

7/19/2019 Student.

java

Student.java

1 package com.studentcourses;
2
3
4 public class Student {
5
6 private String name;
7 private String studentID;
8 private String surname;
9 private int state;
10 private static Course[] takenCourses;
11
12
13
14 public Student (String nameparam, String surnameparam, String matricNo){
15 name = nameparam;
16 surname = surnameparam;
17 studentID = matricNo;
18 System.out.printf("Student Full Name: %s %s \nMatric Number: %s\n", name, surname, studentID);
19 }
20 public Student(Course[] courses){
21 takenCourses = courses;
22 System.out.println("Courses offered: ");
23 System.out.println("Code\tUnit\t\tTitle\t\tStatus");
24
25 }
26
27
28
29 public static void main(String[] args) {
30
31 //To display Student full name and Student ID
32 new Student( "Elijah", "Olumodeji", "11/55EF124");
33 System.out.println();
34
35 //To display Courses offered
36 new Student(takenCourses);
37 Course courses = new Course();
38 courses.getCourses();
39
40 //To display Scores and Grades
41 System.out.println();
42 GradePointAverage PDC701Score = new GradePointAverage();
43 PDC701Score.getPDC701_Score();
44 PDC701Score.AssignGrade();
45
46 GradePointAverage PDC703Score = new GradePointAverage();
47 PDC703Score.getPDC703_Score();
48 PDC703Score.AssignGrade2();
49
50 GradePointAverage PDC704Score = new GradePointAverage();
51 PDC704Score.getPDC704_Score();
52 PDC704Score.AssignGrade3();
53
54 GradePointAverage PDC705Score = new GradePointAverage();
55 PDC705Score.getPDC705_Score();
56 PDC705Score.AssignGrade4();
57
58 GradePointAverage PDC712Score = new GradePointAverage();
59 PDC712Score.getPDC712_Score();
60 PDC712Score.AssignGrade5();
61
62 //To display Student's GPA
63 System.out.println();
64 GradePointAverage GPA = new GradePointAverage();

file:///C:/Student/exportToHTML/com/studentcourses/Student.java.html 1/2
7/19/2019 Student.java
65 GPA.gradePointAverage();
66
67 }
68 }
69

file:///C:/Student/exportToHTML/com/studentcourses/Student.java.html 2/2

You might also like