السام عليكم ورحمه الله
عندي سؤآآل وابي منكم فقط شرحه
السؤآل آعتقد يحتاج داله صديقه صح ؟
هذا هو السؤال
Create two classes Mathematics & ComplexNumbers. The purpose of class Mathematics will be to perform following mathematical operations on its data members.
1. Addition
2. Subtraction
3. Multiplication
4. Display ,it will be a const function and this function will display the data members of the class and also display how many instances of the class have been made.
The data members of the class Mathematics will be following
1. Two floating point numbers number1 and number2.
2. Two ComplexNumbers complexNumber1 and complexNumber2.
The class ComplexNumbers will also have the same function as for class Mathematics but the functionality will be for complex type numbers.
After making the above mentioned classes you have to demonstrate the use of both but make instance of class Mathematics only and call all the functions in main of both the classes i.e. for both floating numbers and complex numbers.