1 (a) Design a Complex abstract type, whose values are complex numbers. Equip your abstract type with operations such as magnitude, complex addition, complex subtraction, and complex multiplication....


1 (a) Design a Complex abstract type, whose values are complex numbers. Equip your abstract type with operations such as magnitude, complex addition, complex subtraction, and complex multiplication. (b) Suggest an efficient representation for your abstract type.


2 (a) Design a Date abstract type, whose values are calendar dates. Equip your abstract type with operations such as equality test, comparison (‘‘is before’’), adding or subtracting a given number of days, and conversion to ISO format ‘‘yyyy-mm-dd’’. (b) Suggest an efficient representation for your abstract type.



Nov 17, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here