Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Child class extending the abstract class
- public class Male extends HealthAbstract {
- public Male() {
- System.debug('Welcome to the male class which extends Health Abstract');
- }
- public override String workoutIntensity(Integer BicepsSize, Integer ChestSize) {
- if(BicepsSize > 16 && ChestSize > 40) {
- return 'More';
- } else {
- return 'Less';
- }
- }
- }
Add Comment
Please, Sign In to add comment