Object oriented programs employ a more specific group of techniques for

Object oriented programs employ a more specific group

This preview shows page 4 - 7 out of 8 pages.

20.Object-oriented programs employ a more specific group of techniques for handling errors called ____.a.exception raisingc.exception handlingb.exception managementd.garbage collectionANS: CPTS:1REF:47521.In object-oriented terminology, an ____ is an object that represents an error.22.If an exception is thrown, it is passed to a block of code that can ____, which means to receive it in a block that can handle the problem.23.When you create a segment of code in which something might go wrong, you place the code in a ____ block.24.Programmers sometimes refer to a situation in which nothing goes wrong as the ____ case.a.rainbow dayc.cloudy dayb.sunny dayd.pessimisticANS: BPTS:1REF:47725.By using ____, you can use reasonable, easy-to-remember names for methods and concentrate on theirpurpose rather than on memorizing different method names.COMPLETION1.A(n) ____________________ method is a method that establishes an object.ANS: constructor
PTS:1REF:4502.An instance of a class becomes eligible for destruction when it is no longer possible for any code to use it—that is, when it goes out of ____________________.ANS: scopePTS:1REF:4573.Libraries, collections of classes that serve related purposes, are also called ____________________.ANS: packagesPTS:1REF:4724.You almost always code at least one catchblock immediately following a(n) ____________________ block.ANS:tryPTS:1REF:4765.When using ____________________, you can develop new classes more quickly by extending classesthat already exist and work.ANS: inheritancePTS:1REF:479MATCHINGMatch each term with a statement below.a.exceptionsf.librariesb.compositiong.catchblockc.abstracth.protectedaccess specifierd.tryblocki.throwstatemente.destructorj.constructor1.A method that has the same name as a class and that establishes an object2.Contains the actions you require when an instance of a class is destroyed3.Placing a class object within another class object4.Used when you want no outside classes to be able to use a data field, except classes that are children ofthe original class5.A class from which you cannot create any concrete objects, but from which you can inherit6.Collections of classes that serve related purposes7.Errors in object-oriented languages8.Sends an Exceptionobject out of the current code block or method so it can be handled elsewhere9.A block of code you attempt to execute while acknowledging that an exception might occur10.A segment of code that can handle an exception that might be thrown by the tryblock that precedes it1.ANS: JPTS:1REF:450
2.ANS: EPTS:1REF:4563.ANS: BPTS:1REF:4584.ANS: HPTS:1REF:4675.ANS: CPTS:1REF:4706.ANS: FPTS:1REF:4727.ANS: APTS:1REF:4758.ANS: IPTS:1REF:4759.ANS: DPTS:1REF:47610.ANS: GPTS:1REF:476SHORT ANSWER1.Explain constructors.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture