Expert Answers

Expert Answers

1. (TCO 8) Please briefly describe best practices as it relates to method names. (Points : 18)

Question 2. 2. (TCO 2) Does Encapsulation imply Data/Information Hiding in object-oriented programming or vice versa? Are these two terms the same? Please explain. (Points : 18)

Question 3. 3. (TCO 2) Given the following list of classes, attributes and methods, 
· identify which items are classes, which items are attributes and which items are methods;

· identify which class each attribute and method belongs to; and

· suggest a class hierarchy given your list of classes.

Question 4. 4. (TCO 7) How do you distinguish between virtual functions and pure virtual functions? How do you use the abstract class and the methods defined inside the abstract class?  

Question 5. 5. (TCO 4) What is inheritance and what are the major benefits of using inheritance? What programming technique shall you follow when the base class methods are not appropriate for the derived class object? 

Question 6. 6. (TCO 6) Distinguish between inheriting interface and inheriting implementation. How do inheritance hierarchies designed for inheriting interface differ from those designed for inheriting implementation?  

Question 7. 7. (TCO 2) Define and implement the overloaded constructors that support the following test function for an Employee class. The data members for the Employee class are:

• age-- integer number
• name-- string
• salary-- floating point number
Powered by