Write a program in Java using Bluej that performs the following tasks: i. Creates a class called Student having protected fields studentName, studentlID, studentMobleNo and a class variable universityName to store the name of the university. Creates a subclass called GraduateStudent of Student class having private fields stdGPA, stdMajor. ii. iii. Creates a subclass called DiplomaStudent of Student class having private fields stdGPA and Course. Write the constructors for Student, GraduateStudent, and DiplomaStudent class to initialize the attributes(fields). iv. Write a method displayDetails() in GraduateStudent and DiplomaStudent class to print all attributes of superclass and subclass. V.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question
i need the answer quickly
Write a program in Java using Bluej that performs the following tasks:
Creates a class called Student having protected fields studentName, studentID,
studentMobleNo and a class variable universityName to store the name of the university.
i.
Creates a subclass called GraduateStudent of Student class having private fields stdGPA,
stdMajor.
ii.
i.
Creates a subclass called DiplomaStudent of Student class having private fields stdGPA and
Course.
Write the constructors for Student, GraduateStudent, and DiplomaStudent class to initialize
the attributes(fields).
iv.
Write a method displayDetails() in GraduateStudent and DiplomaStudent class to print all
attributes of superclass and subclass.
V.
Transcribed Image Text:Write a program in Java using Bluej that performs the following tasks: Creates a class called Student having protected fields studentName, studentID, studentMobleNo and a class variable universityName to store the name of the university. i. Creates a subclass called GraduateStudent of Student class having private fields stdGPA, stdMajor. ii. i. Creates a subclass called DiplomaStudent of Student class having private fields stdGPA and Course. Write the constructors for Student, GraduateStudent, and DiplomaStudent class to initialize the attributes(fields). iv. Write a method displayDetails() in GraduateStudent and DiplomaStudent class to print all attributes of superclass and subclass. V.
Expert Solution
steps

Step by step

Solved in 2 steps with 5 images

Blurred answer
Knowledge Booster
Development strategies
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT