You are on page 1of 3

OBJECT ORIENTED PROGRAMMING

Lab # 02 OOP

MUHAMMAD SAIM ASHRAF

Names

FA21-BEE-128
Registration
Numbers

Class 3A (BEE)

Instructor’s Name DR RIAZ HUSSAIN

Lab Assessment
Post Lab Total
Pre-Lab In-Lab
Data Presentation Data Analysis Writing Style
Lab 02 – Classes and Data Abstraction

5.1:- In this we have to display (I am object number) when


ever an object is created for this I am just using increment and
integer value to show object number.

Link: https://onlinegdb.com/OHqTnY5az

5.2:- In this we have a integer value we have used member


function to initialize it to zero using constructor in main I have
given value to that integer and then it will display it

Link: https://onlinegdb.com/UaxTAtnHNC

6.1:- In this I have calculated number of objects created


and destroyed for counter class for this I have made a default
constructor whch increment count when object is created
then also a destructor which decrement when object goes out
of scope

Link: https://onlinegdb.com/ilq8_XKKB

6.2:- In this we have created a program that display time in


12 hours and 24 hours format for this I have just used display
function and given it a format that can be easily understand by
user

Link: https://onlinegdb.com/HURunrkk_
6.3:- This task is very easy we just need to add some basic
maths in here to calculate the sum and avg of three number in
member function

Link: https://onlinegdb.com/gpBHJEYfcb

You might also like