wiley_pastebin icon

Classes 3

wiley_pastebin | PRO | 03/18/19 10:28:31 AM UTC | 0 ⭐ | 3034 👁️ | Never ⏰ | []
Java |

390 B

|

None

|

0 👍

/

0 👎

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; 
 }
}

Comments