|
A:
class Rectangle {
val width: Int
val length: Int
constructor(_width: Int, _length: Int) {
width = _width
length = _length
}
}
val rectangle = Rectangle()
|
B:
class Rectangle {
val width: Int
val length: Int
constructor(_width: Int, _length: Int) {
width = _width
length = _length
}
constructor(_sizeA: Int, _sizeB: Int) {
width = _sizeA
length = _sizeB
}
}
|
|
C:
class Rectangle {
val width: Int
val length: Int
constructor(width: Int, length: Int) {
width = width
length = length
}
}
|
D:
class Rectangle() {
var width: Int = 1
var length: Int = 1
constructor(width: Int, length: Int) {
this.width = width
this.length = length
}
}
|