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
What is the name of the property that allows Python to call the right method of an object depending on the type of object referenced by a superclass?
(Multiple Choice)
4.9/5
(31)
In an expanded object hierarchy for shapes, which of the following would be the most specific (or least general) class?
(Multiple Choice)
4.9/5
(40)
Case Study 1:
1. myCanvas = Canvas (800, 600)
2. myLine = Line(Point (-100, -100), Point (100, 100))
3. myCanvas.draw(myLine)
-Refer to the session in the accompanying Case Study 1. What can be inferred about the Point class?
(Multiple Choice)
4.8/5
(30)
The __dict__ variable is a dictionary that keeps track of the methods defined for the class.
(True/False)
4.8/5
(32)
Describe the drawAll method of the Canvas class presented in your text.
(Essay)
4.9/5
(33)
Match each definition with its term.
-Provides us with one place to define instance variables and methods used by subclasses.
(Multiple Choice)
4.8/5
(32)
Explain how the Canvas draw method presented in your text makes use of the _draw method in GeometricObject.
(Essay)
4.8/5
(37)
In inheritance, the more general class is called the ____ class.
(Multiple Choice)
4.8/5
(33)
Case Study 1:
1. myCanvas = Canvas (800, 600)
2. myLine = Line(Point (-100, -100), Point (100, 100))
3. myCanvas.draw(myLine)
-Refer to the session in the accompanying Case Study 1. What can be inferred about the Canvas class?
(Multiple Choice)
4.9/5
(27)
What is inheritance? As an example, explain how Shape and a Rectangle are related.
(Essay)
4.8/5
(34)
Match each definition with its term.
-A more general class.
(Multiple Choice)
4.8/5
(38)
Showing 21 - 32 of 32
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)