class PersonTest { public static void main(String[] args) { Person p = new Person(100); boolean bogus1 = p.giveRaise(75); System.out.println("bogus1 is " + bogus1); boolean ok2 = p.giveRaise(25); System.out.println("ok2 is " + ok2); System.out.println("new salary is " + p.getSalary()); } } class Person { private static double SALARY_LIMIT = 100000; private double salary; public Person(double s) { // constructor salary = s; } public double getSalary() { return salary; } public boolean giveRaise(double percent) { double newSalary; if (percent < 0 || percent > 50) return false; else { newSalary = salary * (1.0 + percent/100); if (newSalary > SALARY_LIMIT) return false; else salary = newSalary; } return true; } // end of giveRaise() } // end of class Person