operator overloading
Consider a scenario of a shop that deals in stationary items like books, pencils, pen, geometry boxes ,etc. for example ,Suppose the owner have ordered 3 boxes of pen , 4 boxes of pencils, 10 geometry boxes , 20 boxes of notebooks. So now his inventory consist of all these things. Whenever a customer visits , he buys something from the shop hence ownerâs inventory will be reduced. Show this scenario by overloading predecrement (ââ) operator using friend function. For the above scenario you have to create a class inventory , You have to take the input as number of boxes of all stationary items either by using a constructor or using a getdata function, then as soon as the boxes of respective items are being sold you have to reduce that many items from the inventory using operator overloading . And finally display the remaining inventory details by using a display function .