(Solved): using c++ 4. The two integer variables \( x=9 \) and \( y=4 \) are given as input data. Using "casti ...
using c++
4. The two integer variables \( x=9 \) and \( y=4 \) are given as input data. Using "casting" polymorphic technique write a program that calculate the following expression using integer variables \( x \) and \( y \). \( z=(x+2 y) / 3 \) 5. Create class "Rectangle" that have \( \mathrm{X} \) and \( \mathrm{Y} \) private data for length and width, and selector and modifier methods for this attributes. Create objects rectl and rect2 of Rectangle class and send massages to the length and width attributes of these objects. By overloading the relational operator \( (=) \) check the equality of two objects rectl and rect 2 6. Write programs for writing and reading different type of variables to and from file.