Friday, January 22, 2021

24. Create a class Box containing length, breath and height. Include following methods in it: a) Calculate surface Area b) Calculate Volume c) Increment, Overload ++ operator (both prefix & postfix) d) Decrement, Overload -- operator (both prefix & postfix) e) Overload operator == (to check equality of two boxes), as a friend function f) Overload Assignment operator g) Check if it is a Cube or cuboid Write a program which takes input from the user for length, breath and height to test the above class.

 24. Create a class Box containing length, breath and height. Include following methods in it:

              a) Calculate surface Area

              b) Calculate Volume

              c) Increment, Overload ++ operator (both prefix & postfix)

              d) Decrement, Overload -- operator (both prefix & postfix)

              e) Overload operator == (to check equality of two boxes), as a friend function

              f) Overload Assignment operator

              g) Check if it is a Cube or cuboid Write a program which takes input from the user for                             length, breath and height to test the above class.




No comments:

Post a Comment