DevJourney · code I wrote while learning

README.md

540 B

Create a class called ‘Room1’ with private data members such as length and breadth. Use default constructor to get user input for length and breadth in metre. Create another class called ‘Room2’ with private data members such as length and breadth. Use parameterized constructor to assign user input to length and breadth in feet. Create a friend function for the above two classes to calculate the sum of areas of Room1 and Room2 and display the area in feet (1 m = 3.2808 ft). Write a C++ program to implement the above scenario.