Object-oriented4 2.6 – Generalization Inheritance is used to describe the relationship between classes. What are the three ways in which this relationship is advantageous? - Subclasses that inherit from the same superclass include attributes and behaviors from the superclass. - Changes can be made easily and quickly to a large group of subclasses by making changes to the superclass they inherit from. - Code can be reused through inh.. 2021. 9. 18. 2.5 – Decomposition 2.5 – Decomposition 2021. 9. 18. 2.4 – Encapsulation 2.4 – Encapsulation Besides attributes, a class also defines behaviors through methods. For an object of the class, the methods manipulate the attribute values or data in the object to achieve the actual behaviors. You can expose certain methods to be accessible to objects of other classes, thus, providing an interface to use the class. Encapsulation helps with software changes. The accessible i.. 2021. 9. 18. 1.3 – Object-Oriented Modeling 1.3 – Object-Oriented Modeling Object-Oriented Modeling - When solving a problem, object-oriented modeling involves the practice of representing key concepts through objects in your software. Depending on the problem, many concepts, even instances of people, or tihngs, become distinct objects in the software. Why should you use objects to represent things in your code? - It is a way of keeping y.. 2021. 9. 17. 이전 1 다음