Exam 12: Father Was a Rectangle: Inheritance and Object-Oriented Design
Exam 1: Introduction to Python: Introduction to Numeric Types, Turtle Graphics, Simple for Loops and Functions34 Questions
Exam 2: Pthon: Estimating PI: Math and Random Methods, Selection and Boolean Expressions, the Print Function33 Questions
Exam 3: Codes and Other Secrets: String Operators and Methods, the Len Built-In Function, Keyword Parameters, User Input33 Questions
Exam 4: Introducing the Python Collections: Lists, Dictionaries, Tuples, and Statistics33 Questions
Exam 5: Bigger Data: File Io: the While Loop, String Formatting, Reading Online Data in CSV and Json Formats33 Questions
Exam 6: Image Processing: Nested for Loops, Functions As Parameters, Namespaces, Lists of Lists33 Questions
Exam 7: Data Mining: Cluster Analysis: More on the While Loop; Parrallel Lists31 Questions
Exam 8: Cryptanalysis: Advanced Dictionaries and Lists, Regular Expressions32 Questions
Exam 9: Fractals: the Geometry of Nature: Recursion, Grammars and Production Rules33 Questions
Exam 10: Astronomy: Creating Classes, Writing Constructors, Accessors, Mutators and Special Methods33 Questions
Exam 11: Simulation:computer Simulation Using Objects34 Questions
Exam 12: Father Was a Rectangle: Inheritance and Object-Oriented Design32 Questions
Exam 13: Video Games: Multithreading, Event Handlers, Static Variables33 Questions
Select questions type
How do you call the constructor of a superclass within a subclass?
Free
(Multiple Choice)
4.9/5
(37)
Correct Answer:
B
The constructor method is always named __init__.
Free
(True/False)
5.0/5
(39)
Correct Answer:
True
The ____ relationship describes two objects where one object is a more specific instance of the other.
Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
C
How does a Python object reference the class of which it is an instance?
(Essay)
4.8/5
(42)
Match each definition with its term.
-A more specific class.
(Multiple Choice)
4.8/5
(35)
It is good programming practice to write all the code for a large program at once and then to test it.
(True/False)
4.9/5
(37)
Describe the visibleObject instance variable that was added to the Canvas class presented in your text. How does this variable help improve drawing?
(Essay)
4.8/5
(40)
When designing a project, it is a good idea to begin by making a list of the different kinds of objects involved and the relationships between those objects.
(True/False)
4.8/5
(38)
The ____ method of the screen is used to define the width and height.
(Multiple Choice)
5.0/5
(34)
Match each definition with its term.
-The class from which all classes inherit.
(Multiple Choice)
4.9/5
(42)
Explain the benefits of using inheritance when creating a program that uses a variety of shapes with common characteristics.
(Essay)
4.8/5
(38)
The ______ relationship describes two objects where one object uses another object.
(Multiple Choice)
4.7/5
(36)
The class where the IS-A link originates is called the superclass.
(True/False)
4.8/5
(44)
What is the difference between an IS-A relationship and a HAS-A relationship?
(Essay)
4.9/5
(37)
In the object hierarchy presented in the text, GeometricObject is a(n) ____ class.
(Multiple Choice)
4.9/5
(33)
When two classes are connected by an IS-A link, what do we call a class that inherits from a higher class in the inheritance hierarchy?
(Multiple Choice)
4.8/5
(34)
Case Study 2:
1. >>> myLine
2. <draw.Line object at 0x106f6b0>
3. >>> myCanvas
4. <draw.Canvas instance at 0x1070328>
5. >>> isinstance(myLine, Line)
6. ??????
-Refer to the session in the accompanying Case Study 2. What is output on line 6?
(Multiple Choice)
4.8/5
(34)
In a hierarchy diagram, the most ____ object is at the top.
(Multiple Choice)
4.9/5
(30)
Showing 1 - 20 of 32
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)