2081 8

BIT153 ยท 2081 ยท 5 marks

Write a program to create a class named STUDENT with data member age, then overload the unary operator (++) to increment the age of any object of above class.

Write a program to create a class named STUDENT with data member age, then overload the unary operator (++) to increment the age of any object of above class. [5]

Object Oriented ProgrammingChapter 7: Operator Overloading and Type ConversionOverloading unary operators

Unary operator overloading allows operators like ++, --, - etc. to work with user-defined class objects. The operator function is defined inside the class using the keyword operator followed by the operator symbol. --- --- --- Step Description ------------------- STUDENT s1(20) Object s1 is creat...