Answer to Question #278087 in Java | JSP | JSF for Nandan

Question #278087

We want to calculate the total marks of each student of a class in Physics, Chemistry and Mathematics and the average marks of the class. The number of students in the class are entered by the user. Create a class named Marks with data members for roll number, name and marks. Create three other classes inheriting the Marks class, namely Physics, Chemistry and Mathematics, which are used to define marks in individual subject of each student. Roll number of each student will be generated automatically.

1
Expert's answer
2021-12-11T01:58:31-0500
public class Marks {
    private int rollNumber;
    private String name;
    private double[] marks;
}


public class Mathematics extends Marks{
}


public class Physics extends Marks{
}


public class Chemistry extends Marks{
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS