Student
Write a class called Student
that is a sub-class of the Person
the class is shown below. For this problem, you're only practicing how to write the header for a child class. Include the curly bracket for the body of the class but do not add additional code in the body.
public class Person{
private int age; //a Person has an age
private String profession; //a Person has a profession
}
Syntax for extending is as shown:
public class SubClass extends SuperClass{
} Example: public class Employee extends Person{ }
In the example above, Employee is a subclass of Person.
Type your solution
Skills Practiced:
3.B
4.A
4.B
1.C
Saved
Saved