Professional Documents
Culture Documents
Lab # 04 OOP
Names
FA21-BEE-128
Registration
Numbers
Class 3A (BEE)
Lab Assessment
Post Lab Total
Pre-Lab In-Lab
Data Presentation Data Analysis Writing Style
Lab 04 – Objects and
Methods
5.1:- In this first task we were given an example of complex
class and this program can do addition and we were asked to
also add member of multiplication and subtraction so I just did
some changing in addition function and made two other
member function for subtraction and multiplication and
introduce some other attributes in main to contain that
information
Link: https://onlinegdb.com/2_LjxMMSd3
5.2:- So this time I was given the same program and asked
to just remove the show function from class and define it
outside the class and also as inline function, An inline function
is one for which the compiler copies the code from the
function definition directly into the code of the calling function
rather than creating a separate set of instructions in memory.
Link: https://onlinegdb.com/DYlFFVpNO
5.4:- In this I was just given the the example above named
distance and I just have to test it but I managed to sort it out
and make files of it.
Link: https://onlinegdb.com/52o90NPkGh
6.1:- This task was very easy just like in task 5.1 I was just
asked to add additional member function of subtraction and
multiplication and I just followed the steps I mentioned in task
5.1
Link: https://onlinegdb.com/UEI-yCSdR