Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the class Employee example provided in tutorial 3 . 1 . 7 , what code segment could be added to keep track of the

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 String setJobtitle(String title){
if (title.length()>0){
this.jobtitle = title;
this.numJobTitles +=1;
}
}
public int getNumJobtitles(){
return this.numJobTitles;
}
public void setJobtitle(title){
if (title.length()>0){
this.jobtitle = title;
this.numJobTitles +=1;
}
}
public int getNumJobtitles(numJobTitles){
return this.numJobTitles;
}
public void setJobtitle(String title){
if (title.length()>0){
this.jobtitle = title;
this.numJobTitles +=1;
}
}
public void getNumJobtitles(){
return this.numJobTitles;
}
public void setJobtitle(String title){
if (title.length()>0){
this.jobtitle = title;
this.numJobTitles +=1;
}
}
public int getNumJobtitles(){
return this.numJobTitles;
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

Describe effectiveness of reading at night?

Answered: 1 week ago

Question

find all matrices A (a) A = 13 (b) A + A = 213

Answered: 1 week ago