Final Review
definition
A class _______________ is a set of statements that defines a class's methods and data attributes.
T
A class can be thought of as a blueprint that can be used to create an object.
five
A function is called from the main function and then it calls itself five times. The depth of the recursion is _____________.
accessor
A method that returns a value from a class's attribute but does not change it is known as a(n) __________________.
direct
A recursion in which a function directly calls itself is known as _______________ recursion.
T
A root widget's destroy method can be used as a callback function for a Quit button
loop
A solution using a(n) _____________ is usually more evident than a recursive solution.
derived
A subclass is also called a(n) _____________ class.
F
A subclass may not override any method other than the __init__ method.
base
A superclass is also called a(n) _______________ class.
initialize __init__ (self)
A(n) _____________ method in a class initializes an object's data attributes.
class
A(n) _______________ is code that specifies the data attributes and methods for a particular type of object.
Frame
A(n) ________________ is a container that can hold other widgets and organize the widgets in a window.
callback, event handler
A(n) __________________ function is a function or method that executes when the user clicks a button.
F
All instances of a class share the same values of the data attributes in the class.
recursive
All the cases of a recursive solution other than the base case are called the _____________ case.
F
An "is a" relationship exists between a grasshopper and a bumblebee.
state
An object's ______________ contains the values of the object's attributes at a given moment.
F
Checkbutton widgets are displayed in groups and used to make mutually exclusive selections.
instance
Each object that is created from a class is called a(n) _________________ of the class.
T
Each subclass has a method named __init__ that overrides the superclass's __init__method.
T
Each time a function is called in a recursive solution, the system incurs overhead that is not incurred with a loop.
overhead
Each time a function is called, the system incurs _____________ that is not necessary with a loop.
object-oriented
In _______________________ programming, the programming is centered on objects that are created from abstract data types that encapsulate data and functions together.
inheritance
In a UML diagram, a line with an open arrowhead from a subclass to a superclass indicates ________________.
subclass, derived class
In an inheritance relationship, a minivan can be thought of as a(n) ________________ of the vehicles class.
subclass
In an inheritance relationship, the extended class is called the _____________.
T
Object-oriented programming allows us to hide the object's data attributes from code that is outside the object.
T
Python does not have GUI programming features built into the language itself.
F
Radio buttons can be used to allow the user to make multiple selections at one time.
F
Recursive algorithms are always more concise and efficient than iterative algorithms.
less
Recursive function calls are _________________ efficient than loops.
easily
Some problems are more _________________ solved with recursion than with a loop.
F
The Entry widget's get method retrieves either numeric or string data.
pack
The Label widget's ________________ method determines where a widget should be positioned and makes the widget visible when the main window is displayed.
isinstance
The ____________ function determines whether or not an object is an instance of a specific class or an instance of a subclass of that class.
Canvas
The ________________ widget provides methods that allow the programmer to draw some simple shapes.
recursion
The base case does not require _______________, so it stops the chain of recursive calls.
self
The instance attributes are create by the ______________ parameter and they belong to a specific instance of the class.
loops
The majority of repetitive programming tasks are best done with _________________.
T
The pack method determines where a widget should be positioned.
F
The point (0,0) which represents the same place in a window with the Canvas widget as with turtle graphics.
T
The self parameter is required in every method a class.
T
The self parameter need not be named self but it is strongly recommended to do so, to conform with standard practice.
polymorphism
The term ______________ refers to an object's ability to take different forms.
Coordinates
To create a line with the create_line method of the Canvas widget, you must include four arguments that represent beginning and ending.
F
To use an Entry widget to get data entered by a user, you must use the Entry widget's set method.
T
To use the showinfo function, the tkinter, messagebox module must be imported
smaller
Usually a problem solved by recursion is reduced by making the value of one or more parameters ________________ with each recursive call.
overrides
When a subclass method has the same name as a superclass method, the subclass method _____________ the superclass method.
T
When, in a recursive solution, function A calls function B which, in turn, calls function A, this is known as indirect recursion.
Polymorphism
________________ allows subclasses to have methods with the same names as methods in their superclasses.
Procedural
________________ programming is a method of writing software that centers on the actions that take place in a program.
UML
__________________ provides a set of standard diagrams for graphically depicting object-oriented systems.