9781111969752_TB_ch11 - Chapter 11 More Object-Oriented...

Info icon This preview shows pages 1–3. Sign up to view the full content.

Chapter 11: More Object-Oriented Programming Concepts TRUE/FALSE 1. In object-oriented terminology, “default constructor” means a constructor with a single standard parameter. ANS: F PTS: 1 REF: 450 2. In OO languages, a default constructor is created automatically by the compiler for every class you write. ANS: T PTS: 1 REF: 450 3. Any constructor you write must have the same name as the class it constructs, and it cannot have a return type. ANS: T PTS: 1 REF: 450 4. You can write a default constructor, which is a constructor that accepts parameters. ANS: F PTS: 1 REF: 453 5. You cannot provide parameters to a destructor; it must have an empty parameter list. ANS: T PTS: 1 REF: 456 6. It makes sense that a parent class object has access to its child’s data and methods. ANS: F PTS: 1 REF: 465 7. By using standard component classes, programmers are assured that the GUI components in their programs have the same look and feel as those in other programs. ANS: T PTS: 1 REF: 472 8. The built-in Exception s in a programming language can cover every condition that might be an Exception in your applications. ANS: F PTS: 1 REF: 478 9. Whether you instantiate objects from classes you have created or from those created by others, you save development time because each object automatically includes appropriate, reliable methods and attributes. ANS: T PTS: 1 REF: 479 10. When using existing objects, you need to concentrate only on the interface to those objects, not on the internal instructions that make them work. ANS: T PTS: 1 REF: 479
Image of page 1

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

MULTIPLE CHOICE 1. If a constructor requires arguments, it is a ____ constructor. a. reliable c. default b. private d. nondefault ANS: D PTS: 1 REF: 450 2. A method’s name and a list of argument types together are its ____. 3. The most common way to declare a destructor explicitly is to use an identifier that consists of ____. 4. The relationship created with composition is called a(n) ____ relationship. 5. A(n) ____ in a class diagram indicates public access. a. minus sign c. plus sign b. diamond d. exclamation point ANS: C PTS: 1 REF: 461
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern