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
Sergeu [11.5K]
3 years ago
14

Make a class Employee with a name and salary. Make a class Manager inherit from Employee. Add an instance variable, named depart

ment, of type String. Supply a method toString that prints the manager’s name, department, and salary. Make a class Executive inherit from Manager. Supply appropriate toString & equals methods for all classes. Supply a test program that tests these classes and methods.
Computers and Technology
1 answer:
sweet [91]3 years ago
8 0

Answer:

see explaination

Explanation:

class Employee

{

String name;

double salary;

void tostring()

{

System.out.println("Employee:\nName: "+name+"\nSalary: "+salary+"\n");

}

Employee(String n,double s)

{

name=n;

salary=s;

}

}

class Manager extends Employee

{

String department;

void tostring()

{

System.out.println("Manager:\nName: "+name+"\nDepartment: "+department+"\nSalary: "+salary+"\n");

}

Manager(String n,double s,String d)

{

super(n,s);

department=d;

}

}

class Executive extends Manager

{

void tostring()

{

System.out.println("Executive:\nName: "+name+"\nDepartment: "+department+"\nSalary: "+salary+"\n");

}

Executive(String n,double s,String d)

{

super(n,s,d);

}

}

public class test

{

public static void main(String args[])

{

Employee e =new Employee("Neo",12000);

e.tostring();

Manager m =new Manager("Cramster",100000,"Homework");

m.tostring();

Executive ex =new Executive("Chuks",1000000,"Homework");

ex.tostring();

}

}

You might be interested in
What is a symptom of a failing power supply? The display has only a blinking cursor. The computer displays a POST error code. Th
Mariulka [41]

Answer:

A sympton of a failing power supply is The computer sometimes does not turn on.

Explanation:

All right, the power supply is the terminal that receives electric current to process it and distribute it to the different parts of the hardware that compose the computer. When it fails, the current is not distributed and doesn't reach the different pieces of hardware. Therefore, option D) is the correct one. Another error that could be related is the malfunction of fans but it could be related to wires more than the power itself.

7 0
3 years ago
3. is the system of rules that govern the ordering of values? culture a. Ethics b. organization c. protocol d. value system 3 .
Norma-Jean [14]

Answer:

ethics

Explanation:

The set of principles that guides the ordering of values is known as ethics. Scenario, challenge, or event in which a person has to choose between various morally correct or bad behaviors. The moral principles and norms that govern conduct in the business world.  The rules or norms that regulate a specific individual or a group's behavior. It is also the ethical ideas and standards that society accepts as right or good as opposed to immoral or undesirable.

7 0
1 year ago
What could have made you redesign your plan? Select 3 options.
Masteriza [31]

Answer:

so that their username will still be used and so the can renember the username

Explanation:

that is why

5 0
2 years ago
During an investigation of a cybercrime, the law enforcement officers came across a computer that had the hard drive encrypted.
borishaifa [10]

Answer:

b. Try to convince the owner of the computer to give you to decryption key/password.

Explanation:

Encrypted hard drives have maximum security and high data protection. to access them you need to enter a password to unlock them.

The image filtering technique is a method that serves to selectively highlight information contained in an image, for which it does not work.

The encryption algorithm is a component used for the security of electronic data transport, not to access data on an encrypted hard drive.

The encryption key is used in encryption algorithms to transform a message and cannot be exposed by disconnecting the hard drive from its power source.

4 0
3 years ago
~ I already know this ~ who was the bits victim in five nights at freddys 4 <br> ___10 points___
Andreas93 [3]

Answer:

i dont know anything about them only that the bear is the ducks son and the duck is the fox mom.

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • Jason is working on a project that requires him to manage a huge amount of data. The spreadsheet he is working on has data relat
    12·1 answer
  • While in an interactive nslookup session, you'd use the ______ keyword to change the DNS server you're using
    5·2 answers
  • The _____ is a narrative description of the product, service, or information system.
    7·1 answer
  • Write a function called printEvens that prints all the even numbers between 2 and 20, inclusive. It will take no arguments and r
    6·1 answer
  • A location in memory used for storing data and given a name in a computer program is called a because the data in the location c
    14·1 answer
  • The continue statement _________.
    11·1 answer
  • The method needed to arrange for an object to be notified when a window's close-window button has been clicked is
    6·1 answer
  • Community gardens are public gardens where local residents can grow plants in a plot. They are very popular, so there are often
    7·1 answer
  • What is the meaning of the term plot?<br>A. the final outcome of the story​
    8·1 answer
  • Write a program that reads a list of integers, and outputs the two smallest integers in the list, in ascending order. The input
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!