Let's consider the following hierarchy:
class Car {
}
class RegularCar: Car {
}
class HybridCar: Car {
}
The government, in his wisdom, releases a new law to allow only hybrid cars in the market so our hierarchy becomes:
class Car {
}
class HybridCar: Car {
}
This is not useful anymore, so we can simply remove HybridCar and move all the functionality to the superclass, Car.
}
class HybridCar: Car {
}
This is not useful anymore, so we can simply remove HybridCar and move all the functionality to the superclass, Car.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.