In my parent I have a function that uses 4 sliders from each child class, and it calculates return on assets. How do I move this method to the child classes so it can update when a slider moves?
Code Block func calROA() { let ans = Double(revNum - costNum)/Double(fixANum + curANum) let perAns = ans * 100 print("this is the value for revenue " + "\(revNum)") print("this is the value for costs " + "\(costNum)") print("this is the value for fixed assets " + "\(fixANum)") print("this is the value for current assets " + "\(curANum)") print("this is the roa " + "\(perAns)") roaLabel.text = String(format: "%.1f%%", perAns) }