Question: one java question i WILL like For the class Employee example provided in tutorial 3.1.7, what code segment could be added to keep track of

For the class Employee example provided in tutorial 3.1.7, what code segment could be added to keep track of the number of job titles ever held by an employee in a variable called numJobTitles? public void setJobtitle(String title) if (title.length ( ) >0){ this.jobtitle = title; this.numJobTitles t=1; \} public void getNumJobtitles()\{ return this.numJobTitles; \} public void setJobtitle(title) \{ if (title.length ( ) >){ this.jobtitle = title; this. numbobTitles t=1; 3 3 public int getNumJobtitles(numJobTitles) return this.numJobTitles; 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
