As soon as possible in Java program
LO-1: Demonstrate an understanding of the basic concepts and principles of code modularization and object-oriented programming.
LO-2: Demonstrate an understanding of the basic concepts and principles of object-oriented programming.
LO-3: Use Unified Modeling Language for design analysis and documentation.
Q1: Write a Java program (60 Marks)
Create a class named Salary, and the object of this class is used to calculate individual salaries. It calculates a salary that is a whole number greater than the basic salary. Write three methods to set the basic salary to 5000, to increase the salary by 10%, and to decrease the salary by 10%. Be sure that no method allows the value of the salary to become less than the basic salary. Also, include an accessor method that returns the current salary value, as well as a method that displays the salary on the screen. Do not define an input method. The only method that can set the basic salary is the one that sets it to 5000.
a. Implement the class using Java (35 Marks)
b. Test the class. (15 Marks)
c. Draw the UML diagram for the class (10 Marks)
Submission requirements:
1. Copy and paste the code here.
2. Briefly explain the implementation of these methods.
3. Include screenshots of your outputs.
4. Include UML diagram.
5. Submit the word and Java files on Moodle.