equals() check

Report a typo

Write a program that reads six values (name, age, balance, name, age, balance) and uses all of them as fields of a data class, that is, Client.

Change this given data class in order to check two different clients disregarding their balances. It means that two clients are equal if they have the same name and age. Print the result as true or false.

Sample Input 1:

John
19
0
John
19
22

Sample Output 1:

true
Write a program in Kotlin
data class Client(val name: String, val age: Int, val balance: Int)

fun main() {
//implement your code here
}
___

Create a free account to access the full topic