Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Language : C++ OOP Question 3 [30 Marks] In architectural drawings, the distances are measured in feet and inches according to the English system of
Language : C++
OOP
Question 3 [30 Marks] In architectural drawings, the distances are measured in feet and inches according to the English system of measurement. There are 12 inches in a foot. The length of a living room, for example, might be given as 15'-8", meaning 15 feet plus 8 inches. The hyphen isn't a negative sign; it merely separates the feet from the inches. Figure 1 shows typical length measurements in the English system. Suppose you want to create a drawing or architectural program that uses the English system, it will be convenient to store distances as two numbers, representing feet and inches. Develop a complete class with proper constructor and destructor functions as well as set and get functions to model and program the Distance representation in the English System. Also include two functions, getDistance to get input from the user and showDistance to display the distance in the prescribed format. We need you to keep track of how many instances of the class are created in main or any other function. The class should also provide the following overloaded operator capabilities: 1. Overload the addition operator (+) to add two Distances. 2. Overload the less than operator (
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started