Question
2) Answer following questions based on the UML of the Employee class diagram shown below. Employee + name : String - idNumber : int +
2) Answer following questions based on the UML of the Employee class diagram shown below.
Employee |
+ name : String - idNumber : int |
+ Employee(String, int, String) + String getName() + void setPositionTitle(String) |
a) What is the class name?
b) How many public methods does this class have?
c) How many public data members does this class have?
d) Implement the Employee(String , int , String ) constructor above (No need to write the
complete program, only the constructor method.
e) Implement the setPositionTitle ( ) method. This method should return the position title
of the employee.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started