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
Select the things you can do when working with rows in columns in a spreadsheet:
pantera1 [17]

Answer:

no uttar hai hai hai hai hai uara ke sook na mane yara मर aa

5 0
3 years ago
Which view is most often used to reorder slides in a presentation that has already been created?
riadik2000 [5.3K]

Answer:

Normal view

Explanation:

The normal view is best used because it is just to drag and drop

4 0
3 years ago
Read 2 more answers
Four possible skills a person could have
cluponka [151]

Answer:

Active listening skills.

Genuine interest in others.

Flexibility.

Good judgment.

Explanation:

4 0
4 years ago
A Configuration Management System is a collection of formal documented procedures used to apply the following items EXCEPT:
RoseWind [281]

Answer: (C) Confirm project requirement

Explanation:

 The configuration management is the type of system and it is collection of the formal document that is use to applying for the technical direction. It is the subsystem of the management system of the project.

It basically record each change occur in the project and then report the each change status in the project. It also control various physical characteristics in the project.

It identify all the physical and the functional characteristics of any type of service, result and product in the project document. It basically include the tracking system that is used for the document authorizing and also for the controlling purpose.  

4 0
3 years ago
Devices on a network are identified by what?
Ne4ueva [31]

Answer:

devices on a network are identified by their IP and MAC addresses

5 0
2 years ago
Other questions:
  • What is the smallest unit of measure on the computer
    14·1 answer
  • Like Tess, Brina has a fascinating job! She works as a software engineer with Instagram. She says that Computer Science is a way
    10·2 answers
  • Which of the following is used by a seller to deceive a buyer? a. bait and switch b. contest c. display d. introductory offer
    8·2 answers
  • In our networked world, we have more opportunities to stereotype, which is problematic because:
    7·2 answers
  • A spreadsheet has some values entered: Cell A1 contains 10, cell A2 contains 14, cell A3 contains 7. You enter in cell A4 the fo
    15·2 answers
  • When computing the cost of the basket of goods and services purchased by a typical consumer, which of the following changes from
    11·1 answer
  • Benching system are prohibited in
    5·1 answer
  • 1 : What format would you apply to give an entry the appearance of 12-Mar-2014
    8·1 answer
  • How many lines of text are in your questionnaire document
    5·1 answer
  • PYTON CODERS I NEED HELP I WILL GIVE BRAINLIEST!!! Why is this python code giving me problems?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!