Note that a bracket is missed in the end }, please provide the whole code. note that the setRent has 2 parameters while you are calling it with just one parameter, you are overloading this function so you need to define it in your previous code.