Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- A salary to which a bonus can be applied.
- */
- public class Salary
- {
- private double salary;
- public Salary(int aSalary)
- {
- salary = (double)aSalary;
- }
- public void applyBonus(double bonus)
- {
- salary *= 1 + bonus;
- }
- public double getValue(){return salary;}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement