Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Contract {
- private int totalCost;
- private int hoursLeft;
- private String employer;
- private static int hourlyRate;
- public Contract(String employer, int hours){
- this.employer = employer;
- this.hoursLeft = hours;
- this.totalCost = Contract.hourlyRate * hours;
- }
- //...
- public static void changeRate(int newRate){
- Contract.hourlyRate = newRate;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment