0% found this document useful (0 votes)
39 views7 pages

Syed Shams Haider 203 Lab Report 04

This lab report describes tasks completed for an object-oriented programming lab, including coding a complex number class with addition, subtraction, and multiplication functions; modifying the complex number class to define functions outside the class; testing a distance class; and modifying the distance class to include subtraction and multiplication functions. The conclusion states that the lab helped learn how to resolve runtime errors and implement multiplication and subtraction in a distance class program.

Uploaded by

Syed Shams
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views7 pages

Syed Shams Haider 203 Lab Report 04

This lab report describes tasks completed for an object-oriented programming lab, including coding a complex number class with addition, subtraction, and multiplication functions; modifying the complex number class to define functions outside the class; testing a distance class; and modifying the distance class to include subtraction and multiplication functions. The conclusion states that the lab helped learn how to resolve runtime errors and implement multiplication and subtraction in a distance class program.

Uploaded by

Syed Shams
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

COMSATS UNIVERSITY ISLAMABAD

SYED SHAMS HAIDER

FA19-BEE-203/ISB

LAB REPORT 04

OBJECT ORIENTED PROGRAMING

MISS MEHWISH MEHMOOD

DEPARTMENT OF ELECTRICAL ENGINEERING

 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.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy