// give raise to employee DIS // encapsulation // incomplete program -- feel free to fill in import java.text.DecimalFormat; class Employee { private int ss; private double salary; private int bday; // using short cut for now: monthdayyear private DecimalFormat fmt = new DecimalFormat("0.##"); // constructor Employee(int ss, double salary, int bday) { this.ss = ss; this.salary = salary; this.bday = bday; } // servive method: compute new salary public void give_raise() { int count = 2; salary += (salary/(count*100)) * (rating() + astrology()); } // servive method: print salary public void print() { System.out.println("Employee makes $" + fmt.format(salary)); } // utility method: hidden method for determining rating private double rating() { return Math.random()*2 + 3; } // utility method: hidden method for astrological predictions private double astrology() { // even month people are preferred ;-) if (bday/10000 % 2 == 0) { // quick way of getting the month return 1; } else return 0; } } public class raise { public static void main(String[] args) { // pass in SS, salary, birthday (mmddyy) Employee e = new Employee(123456789, 300000, 20190); e.give_raise(); e.print(); } }