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
Whe you read anything online how do you know whether or not is coming from a reliable source?
lorasvet [3.4K]

You can find the author and research his/her credibility

You can cross-reference the information to other documentations

You can investigate the credibility of the overall website or community. Teachers like to say that community sites like wikipedia aren't very reliable.

4 0
3 years ago
Read 2 more answers
if the bleeding period of a woman is indicated by days of 1-5, then the days when the woman is highly fertile is between______,s
Lana71 [14]

Drink the blood because it taste like candy and juice.

8 0
3 years ago
On the Visit screen, you will not see one of the following:
san4es73 [151]

Answer:

The answer is "Option b".

Explanation:

An access level denotes a set of data type permissions or restrictions, that reduces the access level, which is an effective way to reduce failure modes, debug time and system complexity. and other options are not correct, i.e. define as follows:

  • In option a, In some of the cases, the system provides security, which is responded by the server to check the Eligibility of user, that's why it is not correct.
  • In option c, The home address is always shown on the URL, that's why it is not correct.

8 0
4 years ago
Why is the statement if x=y not working in python
Veronika [31]

Answer:

x=1

Explanation:

Re-run your installer (e.g. in Downloads, python-3.8. 4.exe) and Select "Modify". Check all the optional features you want (likely no changes), then click [Next]. Check [x] "Add Python to environment variables", and [Install]

8 0
2 years ago
Which device stores data only temporarily, and only when the computer is running?
Artist 52 [7]
1. C) RAM

2. C) CPU

3. B) Accounts Payable

I believe these are the correct answers you are looking for.

8 0
4 years ago
Other questions:
  • A network supplies programming and services to a series of local tv stations, or _____, which contract to preempt time during sp
    7·1 answer
  • A bank uses a computer program during the night to tell if the alarm should ring. Sensors in the bank set the following Boolean
    5·1 answer
  • which statement is true? O A Future games will be more context oriented. OB. Future games will be more product driven. Future ga
    13·2 answers
  • Can Any One Marry Baby YODA?
    9·2 answers
  • Tightly.
    5·1 answer
  • Why does this happen to me?
    14·1 answer
  • Tick (/) the correct answers.
    11·1 answer
  • Which computer language uses short words known as mnemonics for writing programs?
    14·1 answer
  • Can you help me in my work
    7·1 answer
  • * Describe the five components of a<br> computer
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!