0

Is it possible to do this?

There are 5 objects 4 classes A, B, AB, C and 1 Boolean RESULT. Each class has 4 integers, for example A has A1max, A1min, A2max, A2min. We have to compare the objects A and B. We need to find what is bigger - A1min or B1min and A2min or B2min and what is smaller - A1max or B1max and A2max and B2max. The results will be set as AB1min, AB2min, AB1max, AB2max. After that object C appears and is compared to object AB. If C1min is bigger than AB1max or C2min is bigger than AB1max then the RESULT is false, if not then the RESULT is true

28th Aug 2022, 5:49 PM
Musya Sapiens
Musya Sapiens - avatar
1 Answer
+ 2
Why not? Implement 4 classes. Then in main class create objects and values then compare as you need. You know that obj.peoperty like a.A1max is the way to access object 'a' property A1max.
29th Aug 2022, 1:14 PM
Jayakrishna 🇼🇳