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, 21.06.2019 22:00
Which one of the following identifies the primary a purpose of information classification processes? a. define the requirements for protecting sensitive data.b. define the requirements for backing up data.c. define the requirements for storing data.d. define the requirements for transmitting data.
Answers: 2
question
Computers and Technology, 22.06.2019 13:30
Write lines of verse that rhyme to remember the following information: acid rain is a type of air pollution caused by chemicals in the air.
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Quic which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
If i wanted to include a built-in calendar in a document, what option could i select? draw table insert table insert chart quick tables
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, 09.12.2021 21:30
question
English, 09.12.2021 21:30
question
English, 09.12.2021 21:30
question
Mathematics, 09.12.2021 21:30
question
Computers and Technology, 09.12.2021 21:30
Questions on the website: 13722361