Using any application of your choice, write a Java program that meets the following requirements: It has an abstract class that contains a student number; Include get() and set() methods for the abstract class where the student number is set/get; Create three child classes, for firstYear, secondYear and thirdYear. Each class must display a distinct announcement for first years, second years and third years.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question
  1. Using any application of your choice, write a Java program that meets the following requirements:
    1. It has an abstract class that contains a student number;
    2. Include get() and set() methods for the abstract class where the student number is set/get;
    3. Create three child classes, for firstYearsecondYear and thirdYear.
    4. Each class must display a distinct announcement for first years, second years and third years.
Expert Solution
steps

Step by step

Solved in 6 steps

Blurred answer
Knowledge Booster
Introduction to Interface
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning