Racecar
is a subclass of Car
Car
is the superclass of Racecar
Racecar
inherits the variables and functions from Car
Car
have access to nitro
Yup! As a subclass of Car
, Racecar
inherits the variables and functions from Car
but only instances of Racecar
can use nitro
.
Ouch! As a subclass of Car
, Racecar
inherits the variables and functions from Car
but only instances of Racecar
can use nitro
.