Sometimes the terms Encapsulation and Data/Information Hiding in object-oriented programming are used interchangeably. Can you give an example, which shows that they are actually different?
Explain how inheritance allows you to use knowledge of general situations and apply it to more specific categories. List the benefits of using inheritance.
Distinguish between inheriting interface and inheriting implementation. How do inheritance hierarchies designed for inheriting interface differ from those designed for inheriting implementation?
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.
*Note : no particular capitalization scheme is used in the list below to differentiate between classes, methods and attributes.
AdhereToBuilding, NumberOfPetals, Photosynthesize, EmitFragrance, Length, Plant, Height, DaysToGermination, Rose, Grow, LosePetals, ConsumeWater, FloweringSeason, Vine, Color, LeavesPerInch
Briefly describe what an Interface is and how it can be used in an object-oriented program. Provide example pseudocode showing how an IShape Interface might be constructed.
Sometimes the terms Encapsulation and Data/Information Hiding in object-oriented programming are used interchangeably
- Technology: WriteUps-papers-Essays-Designs
- Code: SHC_WriteUp_100012