A software engineer is required to implement two sets of algorithms for a single set of matrix operations in an object oriented programming language; the two sets of algorithms are to provide precisions of 10-3and 10-6, respectively. She decides to implement two classes, Low Precision Matrix and High Precision Matrix, providing precisions 10-3and 10-6 respectively. Which one of the following is the best alternative for the implementation?
- (S1) The two classes should be kept independent.
- (S2) Low Precision Matrix should be derived from High Precision Matrix.
- (S3) High Precision Matrix should be derived from Low Precision Matrix.
- (S4) One class should be derived from the other; the hierarchy is immaterial.
Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!