1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
densk [106]
3 years ago
12

Create a subclass of Person called Lecturer that has 2 variables of its own: employeeNumber and salary. As in the above scenario

, these variables should be declared private with the appropriate getter and setter methods to access them.
Computers and Technology
1 answer:
Ahat [919]3 years ago
4 0

Answer:

Following are the class is given below

public class Lecturer  extends Person  

{

private String employeeNumber;// private variable

private double salary;  // private variable

public String getempnumber() // getter method for employeeNumber  

{

return employeeNumber;

}

public void setempnumber(String employeeNumber) // setter method for  employeeNumber variable  

{

this.employeeNumber = employeeNumber;

}

public double getempsalary() //getter method for  salary variable  

{

{

return salary;

}

public void setempsalary(double salary)//setter method for  salary variable  

{

this.salary = salary;

}

}

Explanation:

In this program we create a subclass  Lecturer which inherit person class we declared a two private member in this class one is  employeeNumber which is String type because string can hold integer as well as characters and second is  salary  which is double type then after that we  create a setter method and getter method for both the variable .

for variable “employeeNumber”  we create a public void setempnumber(String employeeNumber) for setter method and public int getempnumber() for getter method similarly for variable “salary” we create public void setempsalary(double salary) setter method and public double getempsalary() for getter method.

You might be interested in
What are the specifications of mine shaft head gear​
svetlana [45]

Answer:

the depth of the shaft,

the carrying load of the skip and the mass of the counterweight,

the approximate size of the winding drum,

the approximate height of the headgear and the sheave wheel

4 0
3 years ago
Read 2 more answers
Chat messages are most likely to be found where on a computer? firewall nic internet history ram
miv72 [106K]
<span>The answer is RAM.  Chat messages are most likely to be found in the RAM of the computer.  It is Random Access Memory.  </span><span>RAM is considered volatile memory, which means that the stored information is lost when there is no more power.</span>
3 0
3 years ago
What are the consequences of digital footprint ?
tekilochka [14]

Answer:

The digital footprint that is left behind can have repercussions in all areas of your teen's life, potentially resulting in missed job opportunities, public sharing of personal information, ruined relationships — or, in what is likely more relevant to them right now: Their parents finding out what they've been up to

Explanation:

8 0
2 years ago
STAY AWAY FROM AND REPORT mariaivanovaloveyou!!!!!!! SHE IS A BRAINLY USER AND KEEPS POSTING INAPPROPRIATE PICTURES OF HER BODY
Bond [772]

Answer:

Yep, saw her posts. Thanks for the warning though. I reported one of her posts. It's just another example of how desperate people are and what measures they will take to get attention. She'll probably be banned soon

Explanation:

Thank you for the warning though. I hope this reaches more people.

7 0
3 years ago
c++ Write a statement that increments (adds 1 to) one and only one of these five variables: reverseDrivers parkedDrivers slowDri
Mazyrski [523]

Answer:

The following statement are:

if(speed < 0) // if statement

{

reverseDrivers++; //if the speed is less than 0, then increment in "reverseDrivers"

}

else if(speed < 1) //else if statement

{

parkedDrivers++; //speed is less than 1, than increments in "parkedDrivers"

}

else if(speed < 40)

{

slowDrivers++; //speed is less then 40, than increment in "slowDriver"

}

else if(speed <= 65)

{

safeDrivers++; //speed is less than or equal to 40, then increment in "safeDriver"

}

else

{

speeders++; //else increment in speeders

}

Explanation:

From the following statement their are certain condition arises

If the speed is less than 0, then increments the “reverseDrivers” variable by 1.

If the speed is less than 1, then increments the “parkDriver” variable by 1.

If speed is less than 40, then increment in "slowDriver" variable by 1.

If speed is less than or equal to 40, then increment in "safeDriver" variable by 1.

Otherwise increment in "speeders"

7 0
3 years ago
Other questions:
  • Digital cameras are less susceptible to UV light.Select one of the options below as your answer:A. TrueB. False
    15·2 answers
  • You're working at a large industrial plant and notice a tag similar to the one shown in the figure above. Which of the following
    9·2 answers
  • If the pc­doctor software is installed on a computer's hard drive, what two different ways can the program be started?
    7·1 answer
  • Sarah, a computer user, tells James, a computer technician, that the network she is connected to is running too slowly. Which of
    5·1 answer
  • . Which of the following is NOT an option for increasinghard drive storage space?
    6·1 answer
  • Edible vaccines, a more controversial approach to vaccine development, have been investigated by scientists. Plants can be genet
    6·1 answer
  • A company asked you help mitigate the brute force attacks carried out against its users' Windows account passwords. You successf
    15·1 answer
  • "What line of code can be used to provide a convenient way to merge the source code from one file with the source code in anothe
    8·1 answer
  • GMI = $4,666.67 Total Monthly Deductions $1,131.00 What is the Net Monthly Income (GMI - Total Monthly Deductions) =
    9·1 answer
  • Which factor affects reading speed the most?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!