Complete the code to overload the plus operator for the Point class.
operator fun Point.plus(other: Point): Point = Point(this.x [1] other.x, this.y + other.y)The plus operator is overloaded by defining operator fun plus and using the + symbol to add the x coordinates.
Complete the code to overload the times operator for the Vector class.
operator fun Vector.times(scalar: Int): Vector = Vector(this.x [1] scalar, this.y * scalar)operator.The times operator multiplies each coordinate by the scalar using the * symbol.
Fix the error in the operator overloading function to correctly overload the unary minus operator.
operator fun Point.[1](): Point = Point(-this.x, -this.y)minus which requires a parameter.unaryPlus instead of unaryMinus.The unary minus operator is overloaded by defining operator fun unaryMinus().
Fill both blanks to overload the compareTo operator for the Box class to compare volumes.
operator fun Box.compareTo(other: Box): Int = this.volume() [1] other.volume() [2] 0
The compareTo operator returns the difference of volumes, so subtract volumes and add zero to complete the expression.
Fill all three blanks to overload the get operator for the Matrix class to access elements by row and column.
operator fun Matrix.get([1]: Int, [2]: Int): Int = data[[1]][[3]]
The get operator uses two parameters, typically named row and column. The data is accessed by data[row][column].