Answer to Question #275794 in Java | JSP | JSF for Afzal

Question #275794

Make a class student. The student class has data members such a sroll number, name, branch. Create a class called exam that has data members roll number and six subject marks. Derive the result class from student and exam it has own data members such a total mark, and result. Write a Java program to model the relationships.


1
Expert's answer
2021-12-05T13:07:21-0500


package studenttest;


class student{
    private String sroll_number, name, branch;
}
class exam extends student{
    private String roll_number;
    private int marks[];
    public void display(){
        marks = new int[6];
    }
}
class result extends exam{
public double totalMark;
public double results;
}




public class StudentTest {


    
    public static void main(String[] args) {
        
    }
    
}

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

Afzal
06.12.21, 01:04

Thank you so much.It is very helpful to me.

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS