Object oriented programming. (Lesson 6, part 2) презентация
Содержание
- 2. Agenda Inheritance Fields/Methods in Extended Classes Constructors in extended classes Inherited
- 3. Agenda Type conversion protected members Object: the ultimate superclass
- 4. Inheritance Inheritance: you can create new classes that are built on
- 5. Inheritance "is a" relationship Inheritance "has a" relationship Composition, having other
- 6. Definitions A class that is derived from another class is called
- 7. Definitions Excepting Object, which has no superclass, every class has one
- 8. Definitions Every class is an extended (inherited) class, whether or not
- 9. Inheritance modifier(s) class ClassName extends ExistingClassName {}
- 10. sample classes Superclass public class Person{ private String name; public
- 11. Inheritance Class hierarchy of previous example Object Person Student
- 12. Fields/Methods in Extended Classes An object of an extended class contains
- 13. Constructors in extended classes A constructor of the extended class can
- 14. Three phases of an object’s construction When an object is created,
- 15. To Illustrate the Construction Order. . .
- 16. Overloading and Overriding Methods Overloading: providing more than one method with
- 17. Accessibility and Overriding a method can be overridden only if it’s
- 20. Hiding fields Fields cannot be overridden, they can only be hidden
- 21. Polymorphism Java allows us to treat an object of a subclass
- 22. Polymorphism Late binding or dynamic binding (run-time binding): Method to
- 24. Type compatibility Java is a strongly typed language. Compatibility when
- 25. Type conversion (1) The types higher up the type hierarchy are
- 26. Type conversion (2)
- 27. Type conversion (3) Type testing: you can test an object’s actual
- 28. protected members To allow subclass methods to access a superclass field,
- 29. What protected really means
- 30. Protected Example
- 31. Object: the ultimate superclass The object class is the ultimate ancestor:
- 32. The class Object: Equivalent Definition of a Class public class Clock
- 33. final Methods and Classes Declaring variables final Indicates they cannot be
- 34. This and super keywords
- 35. Скачать презентацию
Слайды и текст этой презентации
Скачать презентацию на тему Object oriented programming. (Lesson 6, part 2) можно ниже: