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 two statements about IPv6 addresses are true? This task contains the radio buttons and checkboxes for options. The shortcut
Oliga [24]

Answer:

A and C

Explanation:

Option A:

In IPv6 there is a rule to reduce an IPv6 address when there are two or more consecutive segments of zeros just one time. This rule says that you can change the consecutive zeros for “::”  

Here is an example

How to reduce the following IPv6 address?

ff02:0000:0000:0000:0000:0000:0000:d500

Ans: ff02::d500

Example 2:

2001:ed02:0000:0000:cf14:0000:0000:de95

Incorrect Answer -> 2001:ed02::cf14::de95  

Since the rule says that you can apply “::” just one time, you need to do it for a per of zero segments, so the correct answer is:

Correct Answer -> 2001:ed02::cf14:0:0:de95

Or

2001:ed02:0:0:cf14::de95

Option C:

Since in IPv6 there are 2^{128} available addresses which means 340.282.366.920.938.463.463.374.607.431.768.211.456 (too many addresses), there is no need of NAT solution, so each device can have its own IP address by the same interface to have access through the internet if needed. If not, you can block the access through internet by the firewall.

4 0
4 years ago
the two main ways in which marketers address the competition with their strategies are by satisfying a need better than a compet
Nonamiya [84]

Offering a lower price (Apex)

4 0
3 years ago
Read 2 more answers
What are concepts and accrual​
Darya [45]

Answer:

umm oh nvrm i forgot

Explanation:

4 0
3 years ago
Read 2 more answers
Ben is writing web page content on a newly launched gaming gadget. He has to use hyperlinks to help visitors navigate to web pag
GarryVolchara [31]

Answer: A. at the bottom of the web page

Explanation:

3 0
3 years ago
Suppose alice, with a web-based e-mail account (such as hotmail or gmail), sends a message to bob, who accesses his mail from g
Law Incorporation [45]
It would work just fine. It would be harder to read if there are images, but it would still work.
6 0
3 years ago
Other questions:
  • Andy designed a web page for a product-oriented industry using CSS properties. He used several HTML tags to create the web page.
    6·1 answer
  • Betty took her friends bowling. they rented 4 lane. 10 people need rent shoes and
    12·1 answer
  • Analog footage can be digitized using video _____ equipment.â
    7·1 answer
  • In a(n) ________ either one condition or some other condition must be met in order for an event to take place.
    11·1 answer
  • How you will install an operating system on your computer
    5·1 answer
  • A developer has been asked to create code that will meet the following requirements: Receives input of: Map, List Performs a pot
    13·1 answer
  • What is the difference between a master device in a Bluetooth network and a base station in an 802.11 network?
    13·1 answer
  • On tool hackers use to get sensitive information from victims is/are:
    15·2 answers
  • What website or search engine that helps people find the web pages that they are looking for by tying in the subject they want?​
    5·1 answer
  • SOMEONE HELP 60 POINTS!!!!! When creating business publications, these two factors must be determined before planning the layout
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!