issues
search
oldoc63
/
learningFS
Web development back and front
0
stars
0
forks
source link
Create PrimarySchool Class
#983
Open
oldoc63
opened
2 years ago
oldoc63
commented
2 years ago
We'll build a PrimarySchool class that extends School.
oldoc63
commented
2 years ago
Inside the PrimarySchool class, create a constructor() that accepts three arguments
oldoc63
commented
2 years ago
Call super on the first line of the PrimarySchool's constructor(). Pass it any arguments that the parent constructor uses.
Since this is the PrimarySchool class, pass 'primary' as the argument for the level parameter in the parent constructor.
oldoc63
commented
2 years ago
Use the remaining argument to set the pickupPolicy property.
oldoc63
commented
2 years ago
Since our PrimarySchool class inherits School's properties and getters, we only need to create one new getter in the PrimarySchool class.
Add this getter to the PrimarySchool class.
Each getter should return the value saved to that property.