 फलु, बचार, सन्जगुप्ता वट्टर है आव खुडित आरतित्टचा आव खुडित आव खुडित आव खुडित आव खुडित उन्जग वहादे, भच्टरक, बचख़क्टिभा़, एक दिषीळ एक बचार सोोगता if you want to learn programming you can connect with me by following these details you can also download my app tag in it that is available on google play you can search my channel on youtube by typing my name sanjay gupta my channel will be available there it contains various programming related videos and playlists you can subscribe my channel by clicking on this button now coming on to the topic i am going to implement integer class to add subtract multiply and divide two integers in c++ so first of all i am going to include a header file ioscream then i am using a namespace std this namespace is predefined in ioscream header file it is used for scene and cout now class integer inside this class i am declaring a variable int n then in public section i am defining first function that is read here message will be enter a number it will be displayed on console then a number will be received using cn inside n variable for line termination i am using n l n l stands for n line then second function that is print it will display value of n on console so these are two functions for reading and printing value of n now i will be implementing four functions for addition, subtraction, multiplication and division so i am using name of class as return type then function name then integer i this i is formal argument here inside definition i am creating a temporary object t then i am adding values of attribute n after addition i am returning the object t so this is first function for addition function name is sum it will return an integer type object and it is receiving an argument of integer type inside i then t object which is temporary object is created here this n is representing implicit arguments value and i.n is representing explicit arguments value both are added and assigned into temporary objects attribute that is t.n after addition i have returned value of t it will be received inside main method while i will be calling sum function so similar to this definition i have to define three more functions so i am pasting it three times so you can see sum function definition is available four times so now this is subtraction then multiplication and then division so starting from the beginning you can see first function is read second function is print third function is sum fourth is subtraction fifth is multiplication and sixth is division after implementing these classes sorry these functions i am terminating the class now i am implementing main method inside main method i am creating three objects i1, i2 and i3 now i am printing a message enter first value then i am calling i1.read then enter second value and i am calling i2.read so two values are received using these function call read function now i am calling i3 equals to i1.sum and inside this i am passing an argument i2 here i1 is implicit argument and i2 is explicit argument the result of this addition will be stored inside i3 so i am calling i3.print and before that i am printing a message sum is and then return zero so first i am showing you how sum will be called here and the values of two sorry sum of two values will be displayed on console so i am executing this code you can see enter first value and enter a number these messages are available here so i am entering 10 then enter second value number i am entering 20 and sum is value of n is 30 so it is printing 30 as addition of 10 and 20 now i am going to apply all other functions that are subtraction, multiplication and division so i am copying these statements and i have pasted them three times so this first segment is for addition then this is for subtraction then multiplication and then division so this way i have called all four functions this is calling of sum this is calling of subtraction this is calling of multiplication and this is calling of division now two values you have to enter and then addition, subtraction, multiplication and division will be called on those two numbers you can also implement this using switch and case if you want to perform any specific operation so right now i want to perform all the operations that's why i have called all the functions and main function without using switch and case so i am executing this code now i am entering first number as 20 and second number as 30 you can see the output sum is value of n is 30 subtraction is value of n is 10 multiplication is value of n is 200 sorry right 200 and then division is value of n equals to 2 so this way all the functions are called and the results are displayed on console so i hope you have understood how you can implement integer class to add, subtract, multiply and divide two integers in c++ in these functions i have passed objects as an argument and i have returned object as argument so if you want more programming related videos you can visit my channel on youtube here various programming related videos and playlists are available you can also subscribe it by clicking on this red button thank you for watching this video