class Counter {
var count = 0
fun incBy(value: Int) {
count += value;
}
fun incBy(value: Int, amount: Int) {
count += value * amount;
}
}
val counter = Counter()
counter.incBy(1)
//counter.count is 1
println("count is ${counter.count}")
counter.incBy(2, 5)
//counter.count is 11
println("count is ${counter.count}")