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
Which of the following is an example of a trade journal?
Genrish500 [490]

Answer:

since d is incorrect as you said the answer is b then Sports Business Weekly

4 0
2 years ago
Read 2 more answers
Which of the following best describes your sequence of actions when developing a web page?
Anettt [7]

Answer:

I think D

Explanation:

5 0
2 years ago
What tool can help discover and report computer errors when you first turn on a computer and before the operating system is laun
Vlada [557]

Answer:

a post diagnostic

Explanation:

4 0
2 years ago
Read 2 more answers
The advancements in which of the following technologies has most changed the American job market in recent years?
vodka [1.7K]

Answer:

Manufacturing mostly

7 0
3 years ago
Read 2 more answers
The ____ method returns an integer that represents the location of the substring within the string.
enot [183]

Insert Method

it is used to returns an integer that speaks to the area of the substring inside the string.

5 0
3 years ago
Other questions:
  • Information is a valuable asset and not everyone in the world can be trusted with it. Therefore, we need to protect our valuable
    10·1 answer
  • In the file MajorSalary, data have been collected from 111 College of Business graduates on their monthly starting salaries. The
    15·1 answer
  • It proceeds the statement causes execution of the current loop iteration to end and commence at the beginning of the next loop.
    10·1 answer
  • . Two blue armies are each poised on opposite hills preparing to attack a single red army in the valley. The red army can defeat
    5·1 answer
  • A 5-stage MIPS pipeline has a register file without forwarding mechanism. How many NOPs (or bubbles) will you need to add to mak
    9·1 answer
  • In cell B13, create a formula without a function using absolute references that subtracts the values of cells B5 and
    13·1 answer
  • Please help me ASAP! Here is the question.
    15·1 answer
  • My brainly isnt working it isnt showing and answers wats going on? wat do i do
    14·2 answers
  • The physical layer of the OSI model is not foundational to any of the other layers. True or False
    8·1 answer
  • Select the correct technical term for each definition by using the drop-down menus.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!