Chat with us, powered by LiveChat Consider the following class: class Student { private String name ; ?? public void setName ( String n) { ??????? - EssayAbode

Consider the following class: class Student { private String name ; ?? public void setName ( String n) { ???????

 

Consider the following class:

class Student {

private String name ;

   public void setName ( String n) {

        name = n; }

    public String getName () {

         return name ; }

    public Student ( String n) {

        setName (n); }

}

(a)    ( 8 marks ) Extend class Student to class ResearchStudent by adding a data member gpa (standing for grade point average). Marks will be awarded based on correctness of class header, data member and type, getter and setter and parameterized constructor using super keyword.

(b)   (2 marks) Declare a Student object referenced be myStudent and use run-time polymorphism with ResearchStudent whose name is "Robin", gpa is 3.

    Related Tags

    Academic APA Assignment Business Capstone College Conclusion Course Day Discussion Double Spaced Essay English Finance General Graduate History Information Justify Literature Management Market Masters Math Minimum MLA Nursing Organizational Outline Pages Paper Presentation Questions Questionnaire Reference Response Response School Subject Slides Sources Student Support Times New Roman Title Topics Word Write Writing