and follow this uml digram : Grade: This class is used to represent grades of a
ID: 3869948 • Letter: A
Question
and follow this uml digram :
Grade: This class is used to represent grades of a student. Data member of this class is a string label. Course: This class is used to represent a course which a student can take. Data members include a course Grade and a course title. The course grade is an object of type Grade. Student: This class is used to represents a student who can take courses. Has a list of courses as its attributes ReportCard: This class is used to represents a report card for a student. Only attribute is a student object. Comment Step 2 of 12 Identifying methods After classes have been identified, the important methods of the application are defined. Description of methods: The responsibilities or methods for the class are as follows NumericValue: This method is used for returning the numerical value of a Grade. getCourseTitle: This method is used for returning the title of a course object. getGrade: This method is used for returning the grade of a course object. . setGrade: This method is used for setting the grade of a course object. getCourses: This method is used for getting a list of courses that a student is taking. addCourse: This method is used for adding a course. dropCourse: This method is used for dropping a course. gpa: This method is used for calculating the gpa of a student. format: This method is used for formatting the contents of the report card.Explanation / Answer
**Grade.java
public class Grade {
private String label;
public Grade(String label){
this.label = label;
}
public int NumericValue(){
return 0;
}
}
**Course.java:
public class Course {
private String courseTitle;
private Grade courseGrade;
public Course(String courseTitle, Grade courseGrade){
this.courseGrade = courseGrade;
this.courseTitle = courseTitle;
}
public String getCourseTitle(){
return courseTitle;
}
public Grade getGrade(){
return courseGrade;
}
public void addCourse(){
}
public void dropCourse(){
}
}
**Student.java
public class Student
{
private Course[] courses;
public Student(Course[] courses){
this.courses = courses;
}
public Course[] getCourses(){
return courses;
}
}
**ReportCard.java
public class ReportCard
{
private Student student;
public ReportCard(Student student){
this.student = student;
}
public void gpa(){
}
public void format(){
}
}
Now you can include the student info, the range of values of the grade scores.
**Comment for any further queries. Upvote if the answer is satisfactory.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.