SAP interview question

How can define a class of rectangle with different data types?