// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Q)) { fulltimeWorker.CalculateMonthlySalary(); } else if (Input.GetKeyDown(KeyCode.W)) { parttimeWorker.CalculateMonthlySalary(); } }
// Start is called before the first frame update void Start() { andrea.name = "Andrea"; andrea.company = "Goldsmiths"; andrea.salary = 500; andrea.CalculateMonthlySalary(); nima.name = "Nima"; nima.company = "Goldsmiths"; nima.hourseWorked = 20; nima.hourlyRate = 21; nima.CalculateMonthlySalary(); }