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
When coding using the root operation Detachment, the term "ray" is used to describe a particular part of the hand and foot. What
irga5000 [103]

Answer:

Little finger or little toe.

Explanation:

The 5th ray describes little finger or little toe.

4 0
3 years ago
Directions: Fill in the blanks with the appropriate word in each statement below.
mart [117]

Answer:

sbysgscd CD CD vdhdudiididjehgegeueuheve gf hdgowincobwbciehidgwdgiwigwdigxifqugwljvwvwxi2dvwvwxixwvwxvqvwivqi

xwv2digwxivwiw

wxvixbowowxowcohwco2ch2od

odhowhowcowcohwxohwdowdjeciwr

hiwdodwobwdvqoo230ie

9qhowwdhwdigwdoieexohxiefbeoc

hwdhefgdegedogex

Explanation:

9hwx9hex9hexobeb8xgx9jcr

jd2oh2ih2xi2dd2oxivqsg8xwohjgwxohdeohwxihwdoeciwxgiweiguofyoe5u5ew46w57lrroyvyreiyfe1ei2ei2idxwdooydyofpiwigpwxwduo1zuo1dif3o4y

2hupv2rxou2xu2du2d

ou1svxiexuowvouqdip2dpwcuowd2u

qxigqedouovqudipgqipwgipcwpi2di2ipegpi2efpi2dipe2ip1dgxip2ce1piecg1peix1ou2co2dpu1ecgip1eip1deg1euouoeupdeuofour68ditsoysrs27ro457uoeigpexupgeip3dpiwdguof<em>o</em><em>y</em><em>i</em><em>y</em><em>y</em><em>i</em><em>d</em><em>i</em><em>y</em><em>u</em><em>f</em><em>u</em><em>o</em><em>u</em><em>o</em><em>d</em><em>y</em><em>i</em><em>d</em><em>y</em><em>o</em><em>u</em><em>o</em><em><u>o</u></em><em><u>u</u></em><em><u>u</u></em><em><u>p</u></em><em><u>w</u></em><em><u>d</u></em><em><u>9</u></em><em><u>d</u></em><em><u>e</u></em><em><u>d</u></em><em><u>i</u></em><em><u>w</u></em><em><u>g</u></em><em><u>i</u></em><em><u>p</u></em><em><u>2</u></em><em><u>s</u></em><em><u>o</u></em><em><u>u</u></em><em><u>2</u></em><em><u>s</u></em><em><u>g</u></em><em><u>9</u></em><em><u>2</u></em><em><u>3</u></em><em><u>u</u></em><em><u>g</u></em><em><u>o</u></em><em><u>1</u></em><em><u>3</u></em><em><u>u</u></em><em><u>e</u></em><em><u>f</u></em><em>c</em><em>i</em><em>d</em><em>y</em><em>i</em><em>d</em><em>5</em><em>7</em><em>g</em><em>d</em><em>q</em><em>i</em><em>g</em><em>e</em><em>o</em><em>b</em><em>x</em><em>r</em><em>i</em><em>1</em><em>e</em><em>i</em><em>y</em><em>f</em><em>2</em><em>i</em><em>p</em><em>e</em><em>c</em><em>h</em><em>k</em><em>c</em><em>y</em><em>i</em><em>d</em><em>o</em><em>u</em><em>x</em><em>t</em><em>u</em><em>x</em><em>u</em><em>o</em><em>c</em><em>z</em><em>i</em><em>y</em><em>c</em><em>y</em><em>i</em><em>y</em><em>y</em><em>i</em><em>y</em><em>i</em><em>y</em><em>2</em><em>i</em><em>d</em><em>y</em><em>i</em><em>g</em><em>x</em><em>y</em><em>i</em><em>y</em><em>i</em>yiydiyyiiyciyc2ouvyidyiyidydyidiyf7uo2vu1e

8 0
3 years ago
What is the smallest unit of measure on the computer
Sauron [17]
The smallest unit of measure is a “Bit” or a Binary Digit. Glad to help!
4 0
4 years ago
A 200-g hockey puck is launched at an initial speed of 16 m/s up a metal ramp that is inclined at a 30° angle. The coefficients
rusak2 [61]

Answer:

h = 8.588 m

Explanation:

Given:

Mass of hockey puck:  m  =  200  g  =  0.2  K g

Angle of incline:  θ  =  30º   (with respect to horizontal)

Coefficient of static and kinetic friction between the puck and ramp:  

μ s  =  0.4   and    μk  =  0.3

initial speed:  

v  =  3.5  m /s

Let  h  be the vertical height reached by the puck, above the ground. This corresponds to a distance of  

d =  h *sin  30º =  2 *h

along the incline. As the puck is moving, only kinetic friction comes into play as it climbs up the incline. Let  N  be the normal reaction exerted by the metal ramp on the ball. Then,

N  =  m*g *cos  θ  =  0.2 *9.8 1*cos  30 º =  1.6991  N

Therefore, kinetic friction acting on the puck is:  

F k  =  μ k *N  =  0.3 *1.6974  =  0.50974 N

From work energy theorem, the change in kinetic energy should equal the work done by friction and gravity. Therefore,

0.5*  0.2 *16²  =  0.50974 *2h + 0.2*9.81*h

⇒  h = 8.588 m

8 0
3 years ago
Is it possible to learn java s. and c# at the same time? if so I need help who can assist me.
Orlov [11]

Answer:

Both are imperative OOPS. They support classes and objects, and all OOPS features. And you need to learn the same concept in both cases. I am mentioning some of the toughest parts. They support multi-threading, both. And they also support exception handling. And you will find that both languages are different slightly. Also, the syntax of class, objects, inheritance, etc only differs a little. And that is why you can learn both at a time. And with a little more effort, you can learn c++ as well. And in fact, you should first learn C++, and then Java, C# and finally Python.

Explanation:

Please check the answer.

4 0
3 years ago
Other questions:
  • Discuss 2D gameplay and how new platforms such as cell phones are taking advantages of this renewed market
    5·1 answer
  • Which button is used to open the Start menu in Windows Vista?
    14·1 answer
  • When the wires are connected to the terminals of the battery, what causes electric current in the circuit?
    15·1 answer
  • Narrowband Satellite Communications supports ______________ data rates for both mobile and fixed users by providing access on a
    8·1 answer
  • With a DUI charge on a driver’s record ______________.
    10·1 answer
  • What is wrong with the following C++ code? How would you fix it? int sum; for (int i=0; i&lt;1000; ++i) sum += i; { printf("Sum
    5·1 answer
  • What is the missing line?
    5·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    12·1 answer
  • If the system has a mechanical advantage of 5 and the load of 350N.What effort is needed to lift the weight? Provide your answer
    10·1 answer
  • Now that you have learned the basics of acquiring relevant information through research, it's time to put your skills to work.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!