chap08 - Chapter 8 Understanding Inheritance and Interfaces...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Object-Oriented Application Development Using VB .NET 1 Chapter 8 Understanding Inheritance and Interfaces
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 2 Objectives In this chapter, you will: Implement the Boat generalization/specialization class hierarchy Understand abstract and final classes and the MustInherit and NotInheritable keywords Override a superclass method Understand private versus protected access
Background image of page 2
Object-Oriented Application Development Using VB .NET 3 Objectives In this chapter, you will: Explore the Lease subclasses and abstract methods Understand and use interfaces Use custom exceptions Understand the Object class and inheritance
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 4 Implementing the Boat Generalization/ Specification Hierarchy Boat class Stores information about a boat’s State registration number Length Manufacturer Model year
Background image of page 4
Object-Oriented Application Development Using VB .NET 5 Implementing the Boat Generalization/ Specification Hierarchy Boat class Parameterized constructor Accepts values for all four attributes Eight standard accessor methods Four setter methods Four getter methods TellAboutSelf method
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 6 Testing the Boat Superclass with a Windows Form A Windows application and a Windows form with buttons can be used to test all problem domain classes Windows form testers Accomplish the same objective as a class module To systematically test each problem domain class to demonstrate that all functionality works as intended
Background image of page 6
Object-Oriented Application Development Using VB .NET 7 Using the Inherits Keyword to Create the Sailboat Subclass Generalization/specialization hierarchy Superclass Includes attributes and methods that are common to specialized subclasses Instances of the subclasses Inherit attributes and methods of the superclass Include additional attributes and methods
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 8 Using the Inherits Keyword to Create the Sailboat Subclass Superclass Boat class Four attributes and eight accessor methods Subclasses Sailboat Three additional attributes Powerboat Two additional attributes
Background image of page 8
Object-Oriented Application Development Using VB .NET 9 Using the Inherits Keyword to Create the Sailboat Subclass
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 10 Using the Inherits Keyword to Create the Sailboat Subclass Inherits keyword Used in the class header to implement a subclass Indicates which class the new class is extending Example: Class header to define the Sailboat class as a subclass of Boat: Public Class Sailboat Inherits Boat
Background image of page 10
Object-Oriented Application Development Using VB .NET 11 Using the Inherits Keyword to Create the Sailboat Subclass Class definition of a subclass Includes any attributes and methods in
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 47

chap08 - Chapter 8 Understanding Inheritance and Interfaces...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online