(Solved) : Using Java C Using Classes Last Assignment App Student Create Application Tracks Displays Q43932041 . . .
Using Java C+
Using the same classes from the last assignment,app and student, create anapplication that tracks and displays the student’s GPA for 8semesters.
Things to implement:
- Create a method in the class student that returns the student’sGPA.
- Have this method generate the GPA randomly in a range between 0and 4.0.
- Implement a for loop in the application to call for thestudent’s GPA 8 times.
- Display a number to account for the semester (from 1 to 8) andthe student’s name and GPA for each semester
- At the end update the student’s attribute GPA and display thestudent’s name and the final GPA (the average of the 8semesters).
- Do not add any new attributes or variables to the studentclass.
- The only change to the student class should be the addition ofthe new method.
For instance, a report could look like this:
Semester 1 – John’s GPA is 3.5
Semester 2 – John’s GPA is 2.0
Semester 3 – John’s GPA is 4.0
………………………………….
Semester 8 – John’s GPA is 3.0
___________________________
John’s average GPA is 3.2
Suggestions
If you need some help, see below for some suggestions:
My suggestion below is a step-by-step solution. Try to implementeach step, one at a time.
1 – Start with your assignment 01. The new method semesterGPA()is one more method in the student class. The student class shouldstill have everything as in the last assignment.
2 – Create a method called semesterGPA() in thestudent class. This method is going to return arandom value between 0.0 and 4.0. Every time the method is called,it calculates a new random number and returns it.
3 – Change the app.
- App doesn’t need the if statements from assignment 01
- App doesn’t need 3 students as in assignment 01. This time youneed only one student object.
- Include a for loop for the interaction throughthe 8 semesters.
- In the for loop display the student’s name and semesterGPA
- Start accumulating data to calculate later the average GPA
- After the for loop,
- Calculate the average GPA
- Update the student GPA attribute with the calculated averageGPA
- Display the student average GPA using the student GPAattribute
Expert Answer
Answer to Using Java C+ Using the same classes from the last assignment, app and student, create an application that tracks and di…
OR