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.
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.
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 7PE
Related questions
Question
i need the answer quickly
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 5 images
Knowledge Booster
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.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT