Py4e: Chapter 14

Ace your homework & exams now with Quizwiz!

class

shape of an object, template (the cookie cutter) string

state

the set of values of the attributes of a particular object.

object

also called an instance. the cookie to the cookie cutter, (behavior defined by the class)

Which came first, the instance or the class?

class

Which of these statements is used to indicate that class A will inherit all the features of class B?

class A(B) :

What is the syntax to look up the fullname attribute in an object stored in the variable colleen?

colleen.fullname

Which of the following is rarely used in Object Oriented Programming?

Destructor

What does the Python dir() function show when we pass an object into it as a parameter?

It shows the methods and attributes of the object

What is "self" typically used for in a Python method within a class?

To refer to the instance in which the method is being called

What does this Python statement do if PartyAnimal is a class? zap = PartyAnimal()

Use the PartyAnimal template to make a new object and assign it to zap

method

a verb; the object's abilities; the function inside the object. string.uppercase( ) list.append( )

At the moment of creation of a new object, Python looks at the _________ definition to define the structure and capabilities of the newly created object.

class

attributes

data

What keyword is used to indicate the start of a method in a Python class?

def

Which of the following is NOT a good synonym for "class" in Python?

direction

In Object Oriented Programming, what is another name for the "attributes" of an object?

not methods or forms or messages


Related study sets

Entrepreneurship Test #1 Chapters 1, 2, and 3

View Set

Manufacturing Processes: Theory of Metal Machining (CH. 20)

View Set

Postpartum Saunders NCLEX questions

View Set

Module 1: Complex Health Disturbances Related to Fluid & Electrolytes, Acid/Base Balance, and Shock

View Set

Electricity and Magnetism Chap 2-3

View Set

PSY 2012 Exam 4, PSY 2012 EXAM 3, PSY2012 Exam 2 Study Questions, PSY 2012 Exam 1, Ultimate PSY2012 Study Guide

View Set