1. Write a Java program that will take the GPA of consecutive 3 semesters and print theaverage GPA maintaining the following conditions: [5 marks] a) The method GPA_S1() will take the value of gpa_1...


1.<br>Write a Java program that will take the GPA of consecutive 3 semesters and print theaverage<br>GPA maintaining the following conditions:<br>[5 marks]<br>a) The method GPA_S1() will take the value of gpa_1 under the class Semi.<br>b) The method GPA_S2() will take the value of gpa_2 under the class Sem2 (Sem2is<br>a derived class of Sem1).<br>c) The method GPA_S3() will take the value of gpa_3 under the class Sem3 (Sem3is<br>a derived class of Sem2).<br>d) The method SGPA() will calculate the avg_gpa under the class Sem3.<br>e) Create an object id in the main class Test for the class Sem3 and call all the methods<br>using this object to print the avg_gpa.<br>

Extracted text: 1. Write a Java program that will take the GPA of consecutive 3 semesters and print theaverage GPA maintaining the following conditions: [5 marks] a) The method GPA_S1() will take the value of gpa_1 under the class Semi. b) The method GPA_S2() will take the value of gpa_2 under the class Sem2 (Sem2is a derived class of Sem1). c) The method GPA_S3() will take the value of gpa_3 under the class Sem3 (Sem3is a derived class of Sem2). d) The method SGPA() will calculate the avg_gpa under the class Sem3. e) Create an object id in the main class Test for the class Sem3 and call all the methods using this object to print the avg_gpa.

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here