T/F Recursive Functions are less efficient than iterative algorithms
true
A problem can be solved with recursion if it can be broken down into ____ problems
smaller
bases are also called ___
superclasses
when there are several classes that have many common data attributes, it is better to write a(n) _____ to hold all the general data
superclass
___ allows a new class to inherit the members of the class it extends
inheritance
What defines the depth of recursion
the number of times the function calls itself
function a calls for function b, which calls for function c, which calls function a. This is called ____ recursion.
indirect
what is the correct syntax for defining a class dining which inherits from class furniture?
class dining(furniture):
in the following line of code, what is the name of the base class? class male(human)
human
what is another name for the accessor methods
getters
t/f recursion is never required to solve a problem
true
If determining the base case is a first step in designing recursive function, what should be the second step?
determine a way to use recursion in order to solve the problem in all circumstances which cannot be solved without recursion.
which method can you use to determine whether an object is an instance of a class
isinstance
in the following line of code, what is the name of the subclass? class rose(flower)
rose
what is another name for the mutator methods
setters
what is referred to as the base case
at least one case which the problem can be solved without recursion
what is the first step that needs to be taken in order to design a recursive function
identify at least one case which the problem can be solved without recursion.
of the two classes cola and soda, which would most likely be the sub class?
cola
what does a subclass inherit from a superclass
attributes and methods
what is the combining of data and single code in a single object known as
encapsulation
the base case is a case in which the problem can be solved without ______
recursion
what is the relationship called in which one object is a specialized version of another object?
is a
in an inheritance relationship, what is a specialized class called?
subclass, child class
what gives a program the ability to call the correct method depending upon the type of object that is used to call it
polymorphism
what are the procedures that an object performs called
methods