Imagine that you work at Hyperskill and you need to add newly hired employees to a database. A lot of employees are hired daily, and you need to optimize the process.
You have a class Employee:
class Employee(val id: Int, val name: String, val lastName: String, val telNum: String, val email: String) {
fun printData() {
println("Employee $id")
println("full name: $name $lastName")
println("tel. num: $telNum")
println("email: $email")
}
}
From input in the first line you get the number of new employees.
Then on each line of input you have data of one employee: their first name, last name, phone number, and mail, separated by a space.
You need to read their data, create new employees, and display their data on the screen in the special format by using the method printData() from the class Employee. Don't forget about their id!
You can print employee's information right after creating him or you can collect Employee instances to the array and after creating all of them, print information about each employee.