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
Can anybody come up with a catchy title for this?
nekit [7.7K]

What the future beholds!

Trouble with technology? Not a problem!

Techno Gadget

I have more ideas if you're not interested in any of these. :)

7 0
3 years ago
If two egg cells are fertilized what will happen?
Orlov [11]
Just try it and see what will happen
3 0
3 years ago
Rain forests clean the air by producing oxygen. Some rain forest plants have healing properties, and can be used as medicine. Ra
Alla [95]

Answer:

The answer is C. Rain Forests are important for many reasons

Explanation:

7 0
3 years ago
5 efectos del desarrollo tecnológico en el medio ambiente
sineoko [7]

Answer:

english plzzz

Explanation:

5 0
2 years ago
Copy the skeleton of code below into your answer. Then in the space indicated, add your own code to prompt the user for two numb
ahrayia [7]

Answer:

import java.util.*;

public class Main

{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

   

 System.out.print("Enter the first: ");

 int first = input.nextInt();

 System.out.print("Enter the second: ");

 int second = input.nextInt();

 input.nextLine();

 System.out.print("Enter your name: ");

 String name = input.nextLine();

 

 int difference = Math.abs(second - first);

 

 System.out.println(name + ", the difference is " + difference);

}

}

Explanation:

*The code is in Java.

Create a Scanner object to get input from the user

Ask the user to enter the first, second, and name

Calculate the difference, subtract the second from the first and then get the absolute value of the result by using Math.abs() method

Print the name and the difference as in required format

7 0
3 years ago
Other questions:
  • What car dealership websites did you use to conduct your research?​
    8·1 answer
  • How can I sent a message?
    13·1 answer
  • What kind of energy transformation occurs in a gasoline-powered car?
    14·1 answer
  • Sam needs to create a spreadsheet for his coworkers. They will need to follow a crossed a long road of data. Sam would like to m
    15·1 answer
  • An ISP is considering adding additional redundant connections to its network. Which of
    5·1 answer
  • Ile 1 cm<br> ?<br> 50 m<br> The an
    5·2 answers
  • Why are answers not appearing? I've seen many complain about this recently.
    8·1 answer
  • Frank enters "1" in the field for postal code. What is frank most likely trying to do?
    13·2 answers
  • besides entering a url to go directly to a website, what else can you enter in a browser address bar to explore the internet?
    10·1 answer
  • Which of the following protocols is used by an email client to retrieve messages from an email server, giving users the option t
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!