Classes / Constructors

abstract class Man(var name: String)

class Employee(
    var position: String,
    name: String) : Man(name)

//second method (commented out: Man and Employee cannot be
//declared twice in one file)

// abstract class Man{
//     var name: String

//     constructor(name: String) {
//         this.name = name
//     }
// }

// class Employee: Man {
//     var position: String

//     constructor(name: String, position: String): super(name) {
//         this.position = position
//     }
// }

val employee = Employee("booker""Max")

println("name is '${employee.name}'")
println("country is '${employee.position}'")