CISP 10-Chapter 7-12 Final Exam Review

question

1. The ability to use methods without knowing the details of their contents is a feature of _______.
answer

Encapsulation
question

Object-oriented programmers usually specify that their data fields will have _______ access.
answer

Private
question

The data components of a class that belong to every instantiated object are the class’s _______ variables
answer

Instance
question

Object attributes are often called _______ to help distinguish them from other variables you might use.
answer

Fields
question

The purpose of set methods is to set the values of data fields within the class
answer

True
question

A _______ is a term that describes objects with common attributes.
answer

Class
question

_______ is the concept that other classes should not alter an object’s attributes-only the methods of an object’s own class should have that privilege.
answer

Information hiding
question

The set of all the values or contents of a class object’s instance variables is also known as its ______
answer

State
question

When using ________, you can develop new classes more quickly by extending existing classes that already work.
answer

Inheritance
question

With object-oriented programming, once you create an object, you can develop new objects that possess all the traits of the original object, plus any new traits you desire.
answer

True
question

A this reference is an automatically created variable that holds the address of an object and passes it to an instance method whenever the method is called.
answer

True
question

A(n) ______ is one instance of a class.
answer

Object
question

A program or class that instantiates objects of another prewritten class is a class client or _______
answer

Class user
question

A program or class that instantiates methods of another prewritten class is a class client or class user.
answer

False
question

Creating multiple methods with the same name, which will act differently and appropriately when used with different types of objects, is known as polymorphism.
answer

True
question

______ is the process of acquiring the traits of one’s predecessors
answer

Inheritance
question

A _______ reference is an automatically created variable that holds the address of an object and passes it to an instance method whenever the method is called
answer

This
question

With will-written methods that belong to classes you use, you need not understand how they work internally to be able to use them. Will be like if any objects are even
answer

True
question

Everything is an object, and every object is a member of a _____.
answer

Class
question

A(n) _____ is just an abstract description of what an object will be like if any objects are ever actually instantiated.
answer

Class
question

A ______ is an environment in which you can create programs by dragging components such as buttons and labels onto a screen and arranging them visually
answer

Visual development environment
question

A class diagram consists of a ______ divided into three sections.
answer

Rectangle
question

The relationship created when using a class object within another class object is also called a(n) ____ relationship
answer

Has-a
question

A(n) ____ method operates appropriately for such separate instance of a class.
answer

Instance
question

Class diagrams are a type of _____ diagram.
answer

Unified Modeling Language
question

A(n) _______ is the adjective that defines the type of access that outside classes will have to the attribute or method.
answer

Access specifier
question

In addition to their attributes, class objects have methods associated with them, and every object that is an instance of a class possesses that same methods.
answer

True
question

Using a class object within another class object is known as _______
answer

Composition
question

A class can contain another class’s objects as data members.
answer

True
question

Programmers often use a ________ to illustrate class features or to help plan them.
answer

Class diagram
question

When you think in an object-oriented manner, everything is an object, and every object is a member of a method.
answer

False
question

In class diagrams, a ________ sign precedes the items that are private.
answer

Minus
question

Declaring a class creates actual objects.
answer

False
question

A _______ is a set of programs statements that tells you the characteristics of the class’s objects and the methods that can be applied to its objects.
answer

Class definition
question

The concept of a class is useful because of its ______
answer

Reusability
question

______ is the process of creating a new, derived class from a base class.
answer

Inheritance
question

A child class contains all the data fields and _________ of its parent.
answer

Methods
question

When declaring a destructor, which character is used?
answer

Tilde
question

A destructor contains the actions you require when an instance of a class is destroyed.
answer

True
question

A class’s _________ constructor is automatically supplied.
answer

Default
question

An _______ child class method contains the same name and parameters as the parent class method.
answer

Overridden
question

A(n) ______ is a method that establishes an object, reserving enough memory for it and providing its name.
answer

Constructor
question

A subclass constructor can pass _____ or parameters to its parent constructor
answer

Constants
question

A superclass member that is not hidden is invisible in the derived class.
answer

False
question

When a data field is private, it is said to be _______ to any class other than the one in which it is defined.
answer

Inaccessible
question

What is the name of the access modifier that gives child classes access to the parent class’s data fields?
answer

Protected
question

The type of polymorphism that applies specifically to objects of the same parent class is sometimes called _______ polymorphism.
answer

Subtype
question

A constructor may require ______.
answer

Parameters
question

You can write as many constructors for a class as you want, as long as they all have different _____ lists.
answer

Parameter
question

When a superclass contains only constructors that require arguments, you must include at least ____ constructor(s) for each subclass you create.
answer

One
question

A(n) ________ cannot be overloaded.
answer

Destructor
question

If a class’s on constructor requires an argument, you must provide an argument for every object of the class you create.
answer

True
question

A(n) ___________ constructor is one that requires no arguments.
answer

Default
question

Methods that are inherited from a parent class can be overridden.
answer

True
question

A superclass is the same thing as a derived class.
answer

False
question

What is accomplished when you assign a derived class object to an object of any of its superclass types?
answer

Implicit conversion
question

Ever derived class “_______” specific instance of the base class and the derived class.
answer

Is a
question

Derived classes usually have fields and methods that are more _____ than those of their parent classes.
answer

Specialized
question

When you create any subclass object, the ________ constructor executes.
answer

Superclass, subclass
question

All default constructors are automatically supplied.
answer

False
question

A destructor cannot execute unless it is explicitly called from a program.
answer

False
question

One way to give a child class access to a private data field in a parent class is to make the data field public in the parent class
answer

True
question

In a class diagram, what symbol is used for the protected access modifier?
answer

Pound sign
question

When a superclass requires parameters upon instantiation, even if you have no other reason to create a(n) ______, you must write one so it can call its superclass’s constructor.
answer

Subclass constructor
question

Using inheritance saves time since you do not need to recreate a class’s methods and data fields.
answer

False
question

Code that has been used and tested is said to be ______.
answer

Reliable
question

An ______ child class method has the same name and different parameter list as the parent class method.
answer

Overloaded
question

When you instantiate an object that is a member of a class, you are actually calling a constructor method.
answer

True
question

An instance method or constructor may be overloaded by providing the same name and ______ argument list.
answer

A different
question

In some programming languages, such as C#, Visual Basic, and Java, every class you create is a child of one ultimate base class, often called the ______ class.
answer

Object
question

GUI components are often referred to as _______.
answer

Widgets
question

In the early days of computing, interaction with a computer operating system was difficult because the user had to know the exact syntax to use when typing commands, and to spell and type those commands accurately.
answer

True
question

When creating a program that will use a GUI, the interface should be natural and predictable.
answer

True
question

An example of a code error that can occur in multithreading is _____.
answer

Starvation
question

An object that is “interested in” an event you want it to respond to is a(n) ______.
answer

Listener
question

A single CPU can perform two tasks in the same instant.
answer

False
question

If your interface is _____, people are more likely to use it.
answer

Attractive
question

GUI programmers sometimes refer to screen space as _____.
answer

Real estate
question

Within an event-driven program, a component from which an event is generated is the ______ of the event.
answer

Source
question

A(n) _______ is one of the tiny dots of light that form a grid on your screen
answer

Pixel
question

A(n) _______ shows the relationship between screens in an interactive GUI program.
answer

Interactivity diagram
question

It is often helpful to allow users to _______.
answer

Revert to default settings
question

With procedure-driven programs, the user might initiate any number of events in any order.
answer

False
question

A(n) ______ is a list of the objects used in a program, including which screens they are used on and whether any code, or script, is associated with them.
answer

Object dictionary
question

In an event-driven program, you design the screens, define the objects, and define how the screens will correct.
answer

True
question

You create computer animation using a sequence of _______.
answer

Images
question

The computer’s ______ is the software that you use to run a computer and manage its resources.
answer

Operating system
question

Any component you place on the screen has a horizontal, or _______ position.
answer

X-axis
question

Computer users today typically learn new commands for each GUI interface they use.
answer

False
question

The screen design issues that make programs easier to use for people with physical limitations are known as _______ issues.
answer

Accessibility
question

When you program with event-driven languages, the emphasis is on the objects that the user can manipulate, such as buttons and menus, and on the events that the user can initiate with those objects, such as clicking or double-clicking.
answer

True
question

A ______ class contains methods that allow you to set physical properties, such as height and width.
answer

Container
question

You place figures on a graphical screen based on a graphing _______ system.
answer

Coordinate
question

Performing an operation on an icon causes a(n) _______ which is an occurrence that generates a message sent to an object.
answer

Event
question

A _______ represents a picture or sketch of a screen the user will see when running a program.
answer

Storyboard
question

You use ____ to improve the performance of your programs.
answer

Multithreading
question

For today’s computer users, operating system software allows use of a mouse to select pictures, or ______ on the screen.
answer

Icons
question

When a computer contains a single central processing unit (CPU), it can execute ______ computer instruction(s) at a time.
answer

One
question

When you program in a language that supports event-driven logic, you must create the GUI components you need from scratch.
answer

False
question

In a(n) _____ program, each step occurs in the order the programmer determines.
answer

Procedural
question

A button that a user can click to cause some action is an example of a source.
answer

True
question

From the 1950s through the 1980s, almost all interactive dialogues between people and computers took place at the ______.
answer

Command prompt
question

A ________ is the flow of execution of one set of program statements.
answer

Thread
question

When you create a segment of code in which something might go wrong, you place the code in an error block.
answer

False
question

A catch block has no return type and _______ be called directly
answer

Cannot
question

To create your own throwable Exception, you usually extend a built-in __________ class.
answer

Exception
question

When a program throws an exception, you always have to deal with it.
answer

False
question

When illegal division by 0 takes place, an exception object is not created automatically by the object-oriented language application.
answer

False
question

An ______ indicates exception types that might be thrown in the method header.
answer

Exception specification clause
question

You can create your own exceptions.
answer

True
question

Many well-designed programs that try code do not include any catch blocks; instead, they contain only _________.
answer

Try-finally pairs
question

______ is thrown when an object reference does not correctly refer to a created object.
answer

NullReferenceException
question

______ is thrown when you attempt to store an object that is the wrong data type in an array.
answer

ArrayOutOfRangeException
question

A(n) _____ is an unexpected or error condition that occurs while a program is running.
answer

Exception
question

Methods are flexible partly because they are ______.
answer

Reusable
question

A catch block consists of four different elements: the key catch, followed by parentheses that contain an exception type and identifier, statements that take action to handle the error condition, an endcatch statement, and a return statement.
answer

False
question

Dividing by 0 is an error in every programming language because it is an operation that is not defined mathematically.
answer

True
question

Exceptions can be particularly useful when you throw them from ______, which do not have a return type, so they have no other way to send information back to the calling method.
answer

Constructors
question

The memory location known as the _____ is where the computer stores the list of method locations to which the system must return
answer

Call stack
question

When a method in an object-oriented program causes an exception, such as dividing by 0, the method _______.
answer

Throws the exception
question

In Java, an ArithmeticException is a type of _______.
answer

Exception
question

A(n) _________ statement indicates the end of the catch block in the pseudocode.
answer

Endcatch
question

The ____ block is used when the program uses data files that must be closed.
answer

Finally
question

A ______ is one that sends an exception object of a method so it can be handled elsewhere.
answer

Throw statement
question

__________ statement are program statements that can never execute under any circumstances.
answer

Unreachable code
question

Probably the most often used error-handling solution before object-oriented programming was to make a decision before working with a potentially error-causing value.
answer

True
question

Using a traditional error-handling method to avoid dividing by 0 prevents the error and makes the method more flexible.
answer

False
question

_______ is thrown when an arithmetic operation produces a result for which the value is greater than the assigned memory location can accommodate.
answer

OverFlowException
question

A system of passing exceptions through the chain of calling methods has great advantages because it allows methods to handle exceptions whenever the programmer has decided it is most appropriate.
answer

True
question

By inheriting from the Exception class, you gain access to methods contained in the _______.
answer

Parent class
question

When appropriate, specialized _______ classes provide an elegant way for you to handle error situations.
answer

Exception
question

If method A calls method B and method B throws an exception, which method will catch the exception, assuming all methods have a catch block?
answer

Method B
question

You can only place one statement within each try block.
answer

False
question

The object-oriented techniques to manage errors, such as dividing a value by 0, comprise the group of methods known as ______.
answer

Exception handling
question

In object-oriented terminology, you ” _______” a segment of code that might cause an error.
answer

Try
question

When you create an exception, it is conventional to end its name with ______.
answer

Exception
question

The block of code that processes an error in exception handling ” ________.”
answer

Catches the exception
question

A ________ is a segment of code that can handle an exception that might be thrown by the try block that preceded it.
answer

Catch block
question

As with flowcharts, pseudocode, hierarchy charts, and class diagrams, the UML has its own notation that consists of a set of specialized shapes and conventions.
answer

True
question

__________ emphasize what happens in a system.
answer

Behavior diagrams
question

The actual use cases in a use case diagram are represented by __________.
answer

Ovals
question

The UML is a modeling language as well as a programming language.
answer

False
question

System analysis sometimes _______ an existing system to get a better picture of its operation.
answer

Model
question

When you draw a hierarchy chart, you use more of a ” ________ ” approach.
answer

Big picture
question

_________ emphasize the flow of control and data among the things in the system being modeled.
answer

Interaction diagram
question

The _________ is a standard way to specify, construct, and document systems that use object-oriented methods.
answer

UML
question

Large systems are easier to understand when you break them down into _______.
answer

Subsystems
question

Use cases always represent all the functions of a system.
answer

False
question

You use a(n) _______ diagram when you want to emphasize the files, database tables, documents, and other components that a system’s software uses.
answer

Components
question

You use a(n) ______ when a use case is less specific than others are and you want to be able to substitute the more specific case for a general one.
answer

Generalization variation
question

A(n) ______ reunites the flow of control after a fork.
answer

Join
question

The UML was intentionally designed to be technical so that developers, customers, and implementers (programmers) could all “speak the same technical language.”
answer

False
question

A(n) ______ is a use case variation that shows functions beyond those found in a base case.
answer

Extend variation
question

A timing diagram is a type of interaction diagram.
answer

True
question

_______ emphasize the “things” in a system.
answer

Structure diagrams
question

When you draw a flowchart or write pseudocode, your purpose is to illustrate the individual steps in a process.
answer

True
question

You can use the UML’s ______ to construct different kinds of software diagrams and model different kinds of systems.
answer

Shapes
question

In the UML, a _______ block is a handler body node.
answer

Catch
question

The UML is vendor-dependent.
answer

False
question

Determining all the cases for which users interact with systems helps you divide a system logically into ______ parts.
answer

Functional
question

As with a hierarchy chart, you use the UML to create bottom-view diagrams of business processes that let you hide details and focus on functionality.
answer

False
question

Because of its size and imprecision, the UML is relatively difficult to learn.
answer

True
question

A feature that adds to the UML vocabulary of shapes to make them more meaningful for the reader is called a(n) _______.
answer

Stereotype
question

Each variation in the sequence of actions required in a use case is a(n) _______.
answer

Scenario
question

Component and deployment diagrams model the physical aspects of systems.
answer

True
question

Creating a model for an existing system is called _______.
answer

Reverse engineering
question

You use a(n) ________ diagram when you want to focus on a system’s hardware.
answer

Deployment
question

A(n) ______ diagram shows the different points in time
answer

State machine
question

In the UML, a ______ block is called a protected node.
answer

Try
question

In a(n) ______ diagram, you show the flow of actions of a system, including branches that occur when decisions affect the outcome.
answer

Activity
question

The ______ shows how a business works from the perspective of those who actually interact with the business.
answer

Use case diagram
question

________ is the detailed specification of how all the parts of a system will be implemented and coordinated.
answer

System design
question

You use an ______ when a case can be part of multiple use cases.
answer

Include variation
question

______ identify computer memory and storage locations.
answer

Addresses
question

An arithmetic average is known as the _______.
answer

Mean
question

A three-dimensional array’s subscripts are often referred to as row, column, and _______.
answer

Page
question

When records are in ______ order, it means that they are arranged one after another on the basis of the value in dome field.
answer

Sequential
question

You can use a(n) _____ to access data records in a logical order that differs from their physical order.
answer

Either a linked list or an index
question

With an ascending bubble sort, after each adjacent pair of items in a list has been compared once, the largest item in the list will have risen to the top.
answer

False
question

Insertion sort is an unintuitive sorting algorithm, and bears little resemblance to any real-world manual sorting method.
answer

False
question

You can use a bubble sort to arrange records in either ascending or descending order.
answer

True
question

In a ______ storage device, records can be accessed in any order.
answer

Random-access
question

The bubble sort is the only sorting algorithm that exists.
answer

False
question

A(n) ______ is a list of instructions that accomplish a task.
answer

Algorithm
question

When you declare a one-dimensional array, you type ______ after the array’s type and name.
answer

[ ]
question

For a descending sort in which you want to end up with the highest value first, write the decision so that you perform the switch when score [x] is _______ score [x + 1]
answer

Less than
question

The _____ in a list is the value of the middle item when the values are listed in order.
answer

Median value
question

In a bubble sort, you use a(n) ______ loop to make pair comparisons.
answer

Inner
question

When records are arranged in ______ order, it means that they are arranged from lowest to highest value.
answer

Ascending
question

A(n) _____ is a structure in memory that contains records with the one extra field for each record.
answer

Linked list
question

The “real” order in which values are stored in memory is known as the ______ order.
answer

Physical
question

Suppose the value of RENT_BY_FLOOR_AND_BDRMS [0] [1] is 390. The value within the first pair of brackets following the array name refers to the ______.
answer

Row
question

Some languages access two-dimensional array elements with _______ separating the subscript values.
answer

Commas
question

_______ arrays have both rows and columns of values.
answer

Two-dimensional
question

You can think of the single dimension of a single-dimensional array as the height of the array
answer

True
question

Two-dimensional arrays are never actually required in order to achieve a useful program
answer

True
question

When records are arranged in _____ order, it means that they are arranged from highest to lowest value.
answer

Descending
question

When you ______ records, you store a list of key fields paired with the storage address for the corresponding data record.
answer

Index
question

Swapping two values is a concept that is central to most sorting techniques.
answer

True
question

The number of times you need to process the list of values is _____ than the number of elements in the array.
answer

One less
question

In a(n) _______ sort, items in a list are compared with each other in pairs, and when an item is out of order, it swaps values with the item below it.
answer

Bubble
question

Am array that you can picture as a column of values, and whose elements you can access using a single subscript, is a _______ array.
answer

One-dimensional
question

A bubble sort is sometimes called a ______ sort
answer

Sinking
question

A record’s ______ field is the field whose contents make the record unique among all records in a file.
answer

Key
question

In every popular computer coding scheme, “B” is numerically one greater than “A”, and ‘y” is numerically one less than “z.”
answer

True
question

In a bubble sort, you use an outer loop to make the pair comparisons.
answer

False
question

The greatest number of pair comparisons you need to make during each loop is ______ than the number of elements in the array.
answer

One less
question

For an ascending sort, you need to perform the swap () method whenever any given element of the score array has a lower value than the next element.
answer

False

Get instant access to
all materials

Become a Member