Syed Shams Haider 203 Lab Report 04
Syed Shams Haider 203 Lab Report 04
FA19-BEE-203/ISB
LAB REPORT 04
Lab Tasks
5.1. Code the example of complex class given above and
include the functions for addition, subtraction and
multiplication of objects of complex class and return the
object containing result. Test all the functions in main.
5.2. Modify the above task such that; define the member
function show() outside the class and also define it as
inline.
5.3. Modify the task (5.1) by defining all the member
functions outside the class definition.
5.4. Test the distance class example given
above.
HOME TASKS
6.1. Modify the Distance class example of lab task (5.4) by
including functions for subtraction and multiplication of
distance class objects like addition.
CONCLUSION:
From this lab we came to known how to resolve the errors during
runtime and multiplication and subtration properties in a simple
prograsm of distance.