Question: Write a class with name Learner which meets the following requirements: There is a constructor which takes two parameters: name of type String and bodysize
Write a class with name Learner which meets the following requirements:
There is a constructor which takes two parameters: name of type String and bodysize of type Integer.
There is a method getName which returns name of the person.
There is a method getBodysize which returns bodysize of the person.
There is a method growBodynSizes which increases the bodysize by nSizes.
For example:
Test Result
john LearnerJohn Doe",
printjohngetName strjohngetBodysize
john.growBody
printjohngetName strjohngetBodysize
John Doe
John Doe
Answer:penalty regime:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
