Create a class called SkilledITWorker that extends ITWorker and has the following additional private attribute: skill (String)
Fantastic news! We've Found the answer you've been seeking!
Question:
Create a class called SkilledITWorker that extends ITWorker and has the following additional private attribute:
skill (String)
- Write an alternate 3-argument constructor. In addition to passing all 3 arguments to the super class constructor, this constructor should also set the skill attribute to an empty String ("")
- Create a 'getter' and 'setter' method for the skill attribute. The setSkill method must also set the aptitude to 1.
- Create a method called developProficiency that increases the aptitude by 1.
- In this class, implement the hasSkill method works as follows: If the contents of the String argument are equal to the contents of the String in the skill field, return true, otherwise return false.
Posted Date: