Programming Foundation Exam Study
Guide | Latest 2025/2026 Guide
What is an object?
- Correct Answer - Something that has its own identity and
characteristics, separate from other objects.
What three things describe an object in object-oriented programming
languages?
- Correct Answer - identity, attributes, and behavior
What is a class? How do you define a class in Python?
- Correct Answer - A class describes what an object will be, but it isn't
the object itself. A class is a blueprint, a detailed description, a definition
of an object. The syntax for creating a class in Python is:
class <ClassName> (<BaseClass>):
<Block>
Why would we create a class?
- Correct Answer - To create a blueprint upon which to build multiple
objects that share attributes and behaviors
,What is the difference in an object and a class?
- Correct Answer - An object is something that has its own identify and
characteristics, separate from other objects. A class describes that object
will be, but it isn't the object itself. For example, a house is an object and
the blueprints used to create it would be considered the class.
How do you use dot notation to access an attribute of a class?
- Correct Answer - You list the individual object's name that is an
instance of the class, a dot, and then the attribute name. For example
myClass.color would access the color associated with the object
myClass.
What is instantiation?
- Correct Answer - Creating instances of a class
What is abstraction?
- Correct Answer - Focus on the essential qualities of something rather
than one specific example. For example, if I say a table you have an
idea of what I mean even though I didn't say if it was wood/glass or
big/small. This is the essential idea behind creating classes.
What is encapsulation?
, - Correct Answer - Surrounding something, not just to keep the contents
together, but also to protect those contents. Restricts access to the inner
workings of a class or any objects based on that class; this is referred to
as information hiding or data hiding.
What is inheritance? How does inheritance apply to working with
classes?
- Correct Answer - A form of code reuse. We can create a new class,
but instead of writing it from scratch, we can base it on an existing class.
It would inherit some of the characteristics of the base class but could
also have its own unique properties and methods that are not shared
with the base class.
What is polymorphism? How does polymorphism apply to working with
classes? - Correct Answer - Means many forms. It lets us automatically
do the correct behavior even if what we're working with could take one of
many different forms. The + is a great example. If we're adding two
variables together with the plus sign, and these variables are integers, it
will numerically add them. But if they are two strings it will concatenate
them. With classes this allows us to work with objects created from
different classes.
What are the differences in a hashed search and a linear search? -
Correct Answer - A linear search goes through each entry one at a time
to see if the search word matches the word you are looking for. With a
large index and lots of queries this will be a very slow process. A hashed