subject

Create a class called Employee that includes three instance variables—a first name (type String), a last name (type String) and a monthly salary (double). Provide a constructor that initializes the three instance variables. Provide a set and a get method for each instance variable. If the monthly salary is not positive, do not set its value. The Employee class must have the following two functions (a) Function yearly Salary() that calculates and returns the annual income of the Employee. (b) Function giveRaise( ) that increases the Employee’s monthly salary by 10% Write a test app named Employee Test that demonstrates class Employee’s capabilities. Create two Employee objects and display each object’s yearly salary. Then give each Employee a raise and display each Employee’s yearly salary again.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 11:00
This chapter lists many ways in which becoming computer literate is beneficial. think about what your life will be like once you’re started in your career. what areas of computing will be most important for you to understand? how would an understanding of computer hardware and software you in working from home, working with groups in other countries and contributing your talents.
Answers: 1
question
Computers and Technology, 23.06.2019 15:20
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
Hey so i was just trying out some game hacks so i took a paste from online and built it in my visual studio and then suddenly my computer was working or clicking on stuff on its own am i hacked?
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Examine the list below. which factors positively affect lifetime income? check all that apply.
Answers: 1
You know the right answer?
Create a class called Employee that includes three instance variables—a first name (type String), a...
Questions
question
Mathematics, 24.04.2020 11:24
question
Physics, 24.04.2020 11:49
question
Biology, 24.04.2020 11:49
question
Geography, 24.04.2020 11:49
question
Mathematics, 24.04.2020 11:49
Questions on the website: 13722363