Object Oriented Programming207810 marksNumerical: type conversion distance classData Conversion
What is meant by type conversion? Define two way of converting one user defined data type (object) to another user defined object? Write a program that converts object of another distance class with data members feet and inch. (Assume 1m = 3.3 feet and 1cm = 0.4 inch)
What is meant by type conversion? Define two way of converting one user defined data type (object) to another user defined object? Write a program that converts object of another distance class with data members feet and inch. (Assume 1m = 3.3 feet and 1cm = 0.4 inch)[10]
- Source class: Meter with data members meter (m) and centimeter (cm). - Destination class: Distance with data members feet and inch. - Conversion factors: - $1\ \text{m} = 3.3\ \text{feet}$ - $1\ \text{cm} = 0.4\ \text{inch}$ - Task: write a program converting an object of one class to a Distanc...