operator overloading and exception handling