[Solved]Java Arraylist Programming Problem Create Student Class Following Instance Variables Stude Q37224666
(JAVA)
- ArrayList Programming Problem
- Create a Student class that has the followinginstance variables: studentID, mathGrade, englishGrade,socialStudiesGrade and scienceGrade. You may declare studentID ofString data type. You may declare grades for each subject to be ofdouble type. This class has getters and setters for all theinstance variables. Also have a method called getAverage that willcalculate and return the student’s average grade in the fivesubjects. Also, have full-arg constructor.
Create a class called HomeRoomv2 that will havea main method. In the main method, declare an ArrayList of Studentobjects and of length 5. Have menu driven program that will givethe following options to users: 1) Create a Student List, 2)Update a Student, 3) Get Student Grades , 4) Remove aStudent
- To Create a student list : create student objects and add themto the ArrayList.
- To Update a Student: obtain the student id from the user.Traverse through the ArrayList and for each element (index), getthe studentID. If this studentID matches with the given studentID,then ask the user, which grade to update : 1) for math , 2) forEnglish, 3) for social studies and 4) for science. Take in thechoice and then ask for the new grade. Use the setter for theappropriate instance variable and set the grade to the newgrade.
- To Get Student Grades: traverse through the ArrayList and foreach student, get the studentID and grades in each subject and alsoprint the average grades.
- To remove a student, obtain the Student ID and do a search tofind the student index that matches this id. Then remove thestudent at this id.
Expert Answer
Answer to (JAVA) ArrayList Programming Problem Create a Student class that has the following instance variables: studentID, mathGr… . . .
OR

