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
Effectus [21]
3 years ago
11

You are to design class called Employee whose members are as given below:

Computers and Technology
1 answer:
frozen [14]3 years ago
6 0

Answer:

//The Employee Class

public class Employee {

   char name;

   long  ID;

//The constructor  

public Employee(char name, long ID) {

       this.name = name;

       this.ID = ID;

   }

//Method Get Person

   public void getPerson (char newName, long newId){

       this.ID = newName;

       this.ID = newId;

   }

//Method Print

   public void print(){

       System.out.println("The class attributes are: EmpName "+name+" EmpId "+ID);

   }

}

The working of the class is shown below in another class EmployeeTest

Explanation:

public class EmployeeTest {

   public static void main(String[] args) {

       Employee employee1 = new Employee('a', 121);

       Employee employee2 = new Employee('b', 122);

       Employee employee3 = new Employee('c', 123);

       employee1.print();

       employee2.print();

       employee3.print();

   }

}

In the EmployeeTest class, Three objects of the Employee class are created.

The method print() is then called on each instance of the class.

You might be interested in
The <br> is an image at the top of the page that includes the title.
antoniya [11.8K]

Answer:

person to be able to the way you can get a lot and then we have a few months ago but the new one of this message

5 0
3 years ago
A group of computers that are interconnected in order to share information or documents is called a
zaharov [31]

Answer:

computer network

Explanation:

group of computers that are interconnected in order to share information or documents.

4 0
3 years ago
After a file downloads, you can do any of the following except
loris [4]
Change owner rights... I think you forgot to put the choices, I am taking a wild guess of what the answers could have been.
8 0
3 years ago
FOR CALL OF DUTY MOBILE GAMERS PLS HELP!
statuscvo [17]

since the app are two different things its crucial to have a activision account, though the progress wont be reset unless you do have an activision account

8 0
2 years ago
Java uses a right brace to mark the end of all compound statements. What are the arguments for and against this design?
Vlada [557]

Explanation:

The argument is for the right braces.The right braces are used for simplicity.The right brace always terminates a block of code or a function.

The argument against right brace is that when we see a right brace in a program,we are not obvious about the location of the corresponding left brace because all or multiple  statement end with a right brace.

7 0
3 years ago
Other questions:
  • The first electronic networking technology widely used in the United States was the:
    6·1 answer
  • The ____________________ packet-filtering firewall allows only a particular packet with a particular source, destination, and po
    10·1 answer
  • Which of the following keys on a keyboard allows you to select multiple cells located in different parts of your worksheet?
    13·2 answers
  • What is a secondary storage medium that uses magnetic techniques to store and retrieve data on disks or tapes coated with magnet
    6·1 answer
  • The premise of this exam is to synthesize your knowledge and understanding of recursion. Your synthesize may be in the form of a
    14·1 answer
  • Describe at least two other companies that are direct or indirect competitors to your company. Explain how you will differentiat
    15·1 answer
  • Which of the following statements is false? a. As of Java SE 8, any interface containing only one method is known as a functiona
    6·1 answer
  • Put Your Zom Here If You In Zom
    6·2 answers
  • Multiple Choice
    9·1 answer
  • PLEASE HELP!! THIS IS DUE SOON.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!