A. Create a CollegeCourseclass. The class contains fields forthe course ID (for example, CIS 210), credit hours(for example, 3), and a letter grade (for example,A). Include get and set methods for each field.Create a Student class containing an ID number and an array of fiveCollegeCourse objects.
Create a get and set method for the Student ID number. Alsocreate a get method that returns one of the Student’sCollegeCourses; the method takes an integer argument and returnsthe CollegeCourse in that position (0 through 4). Next, create aset method that sets the value of one of the Student’sCollegeCourseobjects; the method takes two arguments—aCollegeCourse and an integer representing the CollegeCourse’sposition (0 through 4).
B. Write an application that prompts a professor to enter gradesfor five different courses each for 10 students. Prompt theprofessor to enter data for one student at a time, includingstudent ID and course data for five courses. Use prompts containingthe number of the student whose data is being entered and thecourse number—for example, Enter ID for student#1, and Enter course ID #5. Verify thatthe professor enters only A, B,C, D, or F forthe grade value for each course. After all the data has beenentered, display all the information in order by student thencourse as shown:
Student #1 ID #101CS1 1 -- credits. Grade is ACS2 2 -- credits. Grade is BCS3 3 -- credits. Grade is CCS4 4 -- credits. Grade is DCS5 5 -- credits. Grade is F
public class CollegeCourse private String courseID; private int credits private char grade; public String getIDC) public int getCredits) public char getGrade() public void setID(String idNum) public void setCredits(int cr) [ public void setGrade(char gr) import java.util. public class InputGrades public static void main(String[] args) // Write your code here public class Student [ private int stuID private CollegeCourse[] course new CollegeCourse[5] public int getID) public CollegeCourse getCourse(int x) public void setID(int idNum) public void setCourse(CollegeCourse c, int x) Show transcribed image text public class CollegeCourse private String courseID; private int credits private char grade; public String getIDC) public int getCredits) public char getGrade() public void setID(String idNum) public void setCredits(int cr) [ public void setGrade(char gr)