If A Class Have Two Data Members And Two Functions To Add Those #453
If a class have two data members and two functions to add those two numbers and to subtract them, which among the following is most efficient if the programmer wants to implement multiplication too?
This multiple choice question (MCQ) is related to the book/course gs gs111 OOP Object Oriented Programming Java. It can also be found in gs gs111 OOps Classes - Object Oriented Programming MCQ: Class Use - Quiz No.1.
If a class have two data members and two functions to add those two numbers and to subtract them, which among the following is most efficient if the programmer wants to implement multiplication too?
Define a public function which multiplies two numbers
Define a public function that returns values of two data members
Define a private function which multiplies two numbers
Define a private function that returns values of two data members