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
lana66690 [7]
3 years ago
13

Create a class named Employee. The class must contain member variables for the employee name and salary. It should contain gette

r methods for returning the name and salary. It should also contain setter methods for storing the name and salary. The class must include a constructor method for setting both the name and the salary. In addition, it should contain a toString() method.2- Create the client code to test the class Employee.
Computers and Technology
1 answer:
Lerok [7]3 years ago
8 0

Answer:

Explanation:

The following code was written in Java. The code contains the Employee class which contains the two variables (name, salary), the constructor, getter and setter methods for both variables, and an overwritten toString method. It also contains a tester class with the main method inside and creates a Employee object and initializes it. Then it calls the toString method. The output can be seen in the attached image below. Due to technical difficulties I have added the code as a txt file below.

You might be interested in
Method: public ArrayList diff(ArrayList list1, ArrayList list2) {} diff() method accepts two ArrayLists of Integer and returns t
babymother [125]

Answer:

(Assuming Java)

public ArrayList diff(ArrayList list1, ArrayList list2) {

   ArrayList<Integer> union = new ArrayList<>();

   for (int element : list1) {

       union.add(element);

   }

   for (int element : list2){

       if (!union.contains(element)) {

           union.add(element);

       }

   }

   return union;

}

Explanation:

Create an ArrayList that has the union of list1 and list2.

First for loop copies all elements into the union array list.

Second for loop adds all elements that are not yet in the union arraylist to the union arraylist.

(Keep in mind that I assume that you mean a mathematical union, so no duplicates. If this is not what you mean, remove the if statement in the second for loop)

5 0
3 years ago
What are listed in the vertical columns across the top of the Event Editor?
jeka57 [31]

Answer:

a

Explanation:

7 0
4 years ago
Read 2 more answers
CPT (Current Procedural Terminology) codes consist of 3-4 numbers representing a unique service. True False
xz_007 [3.2K]
This is in fact false to my knowledge
4 0
4 years ago
Please help by friday
xeze [42]
Not worth the 5 points selfish
8 0
2 years ago
One method of encoding messages is known as the "expanding square code". this method encodes message by placing the character of
mars1129 [50]
Wow!! that is ALOT of info,I dont think i could help with this one Umders 699 maybe someone else can sorry that i couldn`t help :)
4 0
4 years ago
Other questions:
  • Which component of the Hyper-V architecture controls all communication with the physical hardware on the computer?
    8·1 answer
  • Change the shape fill color to Dark Red. It is the first option in the Standard Colors section of the color palette.
    13·1 answer
  • A/an<br> controls the flow of data between a computer and the network.
    8·1 answer
  • George enters the types of gases and the amount of gases emitted in two columns of an Excel sheet. Based on this data he creates
    6·1 answer
  • Why is the technology so effective in tracking contacts
    7·1 answer
  • Exercise #3: Write a c++ program that reads, from a file called numbers.in, up to 10 numbers, counts and adds the positive value
    10·2 answers
  • Problem 4 (25 points)Consider a byte addressing architecture with 64-bit memory addresses.(a)Which bits of the address would be
    5·1 answer
  • What can a user modify on a business card using the Edit Business card in the dialog box?​
    8·1 answer
  • Which of the following are parts of the natural environment? (Select the best four answers.)
    5·1 answer
  • Lucy wants to access the webpage. She is using her computer to access the webpage. What types of information will be in one fram
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!