Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 7. Object-Oriented Programming

7. Object-Oriented Programming

Exam Objectives

1.2Develop code that declares an interface. Develop code that implements or extends one or more interfaces. Develop code that declares an abstract class. Develop code that extends an abstract class.
1.5Given a code example, determine if a method is correctly overriding or overloading another method, and identify legal return values (including covariant returns), for the method.
1.6Given a set of classes and superclasses, develop constructors for one or more of the classes. Given a class declaration, determine if a default constructor will be created and, if so, determine the behavior of that constructor. Given a nested or non-nested class listing, write code to instantiate the class.
5.1Develop code that implements tight encapsulation, loose coupling, and high cohesion in classes, and describe the benefits.
5.2Given a scenario, develop code that demonstrates the use of polymorphism. Further, determine when casting will be necessary and recognize compiler versus runtime errors related to object reference casting.
5.3Explain the effect of modifiers on inheritance with respect to constructors, instance or static variables, and instance or static methods.
5.4Given a scenario, develop code that declares and/or invokes overridden or overloaded methods and code that declares and/or invokes superclass or overloaded constructors.
  • For overloaded methods and constructors, see also Chapter 3, p. 39.

5.5Develop code that implements “is-a” and/or “has-a” relationships.


Supplementary Objectives

  • Understand the concepts single implementation inheritance, multiple interface inheritance, subtype-supertype relationship, and their implications for object-oriented programming (OOP).

  • Understand the contexts in which widening and narrowing reference conversions are applied.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial