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 06:00
Which statistical function in a spreadsheet you to see how far each number varies, on average, from the average value of the list?
Answers: 2
question
Computers and Technology, 23.06.2019 19:30
Of the following pieces of information in a document, for which would you most likely insert a mail merge field?
Answers: 3
question
Computers and Technology, 24.06.2019 13:00
If you add the following to the query grid in an access query, what is it called? salestaxamt: [salestaxrate]*[totalsale] formula calculated field total calculation
Answers: 2
question
Computers and Technology, 25.06.2019 04:30
The word window is an example of a /an
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.04.2020 22:15