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
Aloiza [94]
4 years ago
13

Design a class named Person and its two subclasses named Student and Employee. Make Faculty and Staff subclasses of Employee. A

person has a name, address, phone number and e-mail address. A student has a class status (freshman, sophomore, junior or senior). Define the status as constant. An employee has an office, salary, and experience (number of years, integer value). A faculty member has office hours and a rank. A staff member has a title. Override the toString method in each of the class to display the class name and the person’s name.
Computers and Technology
1 answer:
harina [27]4 years ago
3 0

Answer:

se explaination

Explanation:

//Design a class named Person

public class Person

{

//A person has a name, address, phone number, and email address.

String name;

String address;

String phone;

String email;

//Constructor with arguments

public Person(String pname,String paddress,String phNum,String pemail)

{

name=pname;

address=paddress;

phone=phNum;

email=pemail;

}

// toString() method to return the name

public String toString()

{

return getClass().getName()+" "+name;

}

}

---------------------------------------------------------

//Student.java

public class Student extends Person

{

//A student has a class status

//(freshman,sophomore, junior, or senior).

//Define the status as a constant.

final int freshman =1;

final int sophomore =2;

final int junior=3;

final int senior=4;

String status="freshman";

//Constructor with arguments

public Student(String name, String address,String phonenumber, String email, int Status)

{

super(name,address,phonenumber,email);

if(Status == 1)

{

status = "freshman";

}

if(Status == 2)

{

status = "sophomore";

}

if(Status == 3)

{

status = "junior";

}

if(Status == 4)

{

status = "Senior";

}

status = "Student";

}

public String toString()

{

return super.toString() + " " + status;

}

}

------------------------------------------------------

//Employee.java

public class Employee extends Person

{

//An employee has an office, salary, and date hired.

String office;

double salary;

java.util.Date dateHired;

//Constructor with arguments

public Employee(String name,String address,String phonenumber,String email,String off,double sal)

{

super(name,address,phonenumber,email);

office=off;

salary=sal;

}

public String toString()

{

return (super.toString() + " " + office +" " + salary);

}

}

--------------------------------------------------------

//Faculty.java

public class Faculty extends Employee

{

//A faculty member has office hours and a rank.

String officeHours;

String rank;

//Constructor with arguments

public Faculty(String name,String address,String phonenumber,String email,String off,int salary,String offHours,String ranks)

{

super(name,address,phonenumber,email,off,salary);

officeHours=offHours;

rank=ranks;

}

public String toString()

{

return (super.toString() + " " + officeHours +" " + rank);

}

}

-----------------------------------------------------------------------------

//Staff.java

public class Staff extends Employee

{

//A staff member has a title

String title;

//Constructor with arguments

public Staff(String name,String address,String phonenumber,String email,String off,int salary,String ti t)

{

super(name,address,phonenumber,email,off,salary);

title=ti t;

}

public String toString()

{

return (super.toString() + " " + title);

}

}

You might be interested in
to create an app for a mobile device, yourself, you would use BLANK software like Swift, Corona or Scratch.
stiv31 [10]
True

All the programming languages mentioned above synchronizes best with contemporary mobile platforms. Corona, for instance, is built on the programming language LUA and is used in the creation of Android mobile apps, primarily games. 

Swift on one hand is best for an apple creation (IOS and OSX). Swift is an open source which is extremely easy to learn, and is the future of mobile app development. 

On the other hand, scratch is a programming language where children can program and is used as an introductory language. Skills learned from using scratch can be applied to other basic languages like Java and python.

7 0
3 years ago
2. How do cell phone users stay connected to the network as users move between cells?
kramer

Answer: Cell phones use radio waves to communicate

Explanation:

Radio waves carry the information and travel in air at the speed of light. Cell phones transmit radio waves in all directions.

5 0
3 years ago
You've been hired as a consultant to help an online store owner. You need to complete the implementation of conversion tracking
mote1985 [20]

Answer:

Google Tag Assistant can help you in the following  ways:

  • It tells you location of tags on each web page. So this feature helps by giving you a complete overview of your tags that where they are working on which page of a site.
  • It provides reasons for non-efficiency of tags. If a tag is not working then a given feature provides the reason like some error or network issue or something else which causes the tags to cease working.

Explanation:

Tag Assistant is a Chrome Extension that helps by  automatically validating the implementation of Google tracking scripts on any given page.

It automatically creates snippets for tag code.

So that tag code snippet will help you by allowing you to add it anywhere you want to add on a website or page by adding its code.

It also creates the Google Click Identifier tag that has an abbreviation as (GCLID).

<h3>I hope it will help you!</h3>
8 0
3 years ago
What type of control repairs the effects of damage from an attack? Physical control Technical control Corrective control Logical
Inessa [10]

Answer:

Corrective Control

Explanation:

Physical Control are devices that limit access or otherwise protect a resource, such as fences, doors, locks and fire extinguishers.

Technical Control are devices or processes that limit access to resources. Examples include user authentication, antivirus software, and firewalls. Technical controls are also called <em>Logical Control</em>

Corrective Control repair the effects of damage from an attack.  Corrective contol include: include virus removal procedures, firewall table updates, and user authorisation database updates.

8 0
4 years ago
Why is it important to minimize cable clutter in a rack?
V125BC [204]

Answer: Cable clutter is the mess created due to cables of the operating system units in the rack.The reduction in the cable clutter is important because it make the computing environment clear and prevent the blockage in flow of air, reducing the litter in rack environment etc  

The clearance of the cable clutter can be done with the help of cable managers for collecting the cables and tying them into one section, organizing and clearing the cabinets of rack.

8 0
3 years ago
Other questions:
  • To illustrate a point in a Word document with a simple chart, what command should you select
    6·2 answers
  • What conversion factor should be used to convert from meters to Gigameters?
    9·1 answer
  • Clifford created a table using OpenOffice Writer and entered some information into the table. Later, he needed to add more rows
    15·2 answers
  • 1. An auto repair shop charges as follows. Inspecting the vehicle costs $75. If no work needs to be done,
    9·1 answer
  • Cliff just started working with a client who has a very disorganized AdWords account. What’s an effective way for him to begin r
    15·1 answer
  • Name the months that have 30 days​
    6·2 answers
  • Missing slot covers on a computer can cause?
    9·1 answer
  • How can I record Tv shows on the Android OTT TV BOX either on the Box or on Kodiak without buying a Tv Tuner?
    12·2 answers
  • Does unturned game is good for low end PC that without graphics card?​
    5·1 answer
  • ______allow you to select elements that are in a certain state, such as when the mouse if hovering over an element
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!