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
What is the Multiplier if the change in RGDP is $525,000,000 and initial spending is $100,000?
OLEGan [10]
The right answer is A
4 0
3 years ago
What are the two most important network-layer functions in a datagram network? what are the three most important network-layer f
PIT_PIT [208]
1. Datagram-based network layer: Forwarding, Routing.
2. VC- based network layer: Forwarding, Routing, Call setup.
7 0
3 years ago
The ___________ method returns the length of an array.
MaRussiya [10]

Answer:

A. Append

Explanation:

4 0
2 years ago
Read 2 more answers
A table with a width set to 600 pixels will look ________ on a monitor with resolution set to 640 × 480 than on a monitor with r
egoroff_w [7]
There are no options.

It would, however, look larger.
3 0
2 years ago
How are special characters added to a Word document? Check all that apply.
MrRissso [65]

It kinda depends on what you mean by special characters

7 0
2 years ago
Read 2 more answers
Other questions:
  • Which method deletes a footer from a document?
    13·2 answers
  • Stress results from _______. A. Outside stimulus b. Internal stimulus c. Outside calm d. Internal calm
    12·2 answers
  • In windows xp, which control panel icon should you choose if you would like to customize your system for left-handed use?
    7·2 answers
  • Write a program that reads in ten numbers and displays the number of distinct numbers and the distinct numbers separated by exac
    7·1 answer
  • Select the correct text in the passage. George is working as a lead team lead. Which statements correctly describes the skills t
    12·1 answer
  • Explain how SEO impacts the way you should interpret search engine results ???
    6·1 answer
  • To have a reason or purpose to do something
    8·2 answers
  • 6. You and your friends take an awesome selfie, and you add your name and addresses to the picture. It is a good idea to share t
    11·1 answer
  • What do you think Amazon should fix?
    13·2 answers
  • Which of the following best describes a hotspot as
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!