Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. Starting with your class Person from Homework 05, define a class Student that extends Person. Then do the following: (a) In addition to the
2. Starting with your class Person from Homework 05, define a class Student that extends Person. Then do the following: (a) In addition to the properties of a Person, a Student has the following proper ties: a student ID number, a School (define a simple class for this), and a major (e.g., "Computer Science"; use a string). (b) You will need a constructor for the Student class. In Java, your constructor must call the parent class constructor using super with appropriate arguments. A student always has an id number and school, so these should be arguments to (c) Add a method greeting to your Person class that returns a short greeting that (d) Override this method in your Student class so that students whose major is Illustrate all of these with a main method in either the Student class or a separate your constructor, as well as whatever is required for a Person. a person might use (e.g., "Hello"). Computer Science say "Greetings Earthling!" and other students say "Hey." test class
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started