• Home
  • Textbooks
  • Starting Out with Programming Logic and Design
  • Object-Oriented Programming

Starting Out with Programming Logic and Design

Tony Gaddis

Chapter 14

Object-Oriented Programming - all with Video Answers

Educators


Chapter Questions

01:24

Problem 1

What is an object?

Brian Lin
Brian Lin
Numerade Educator
01:18

Problem 2

What is encapsulation?

Adam Conner
Adam Conner
Numerade Educator
01:18

Problem 3

Why is an object’s internal data usually hidden from outside code?

Jennifer Stoner
Jennifer Stoner
Numerade Educator
01:12

Problem 4

What are public methods? What are private methods?

Jennifer Stoner
Jennifer Stoner
Numerade Educator
00:19

Problem 5

You hear someone make the following comment: “A blueprint is a design for a
house. A carpenter can use the blueprint to build the house. If the carpenter
wishes, he or she can build several identical houses from the same blueprint.”
Think of this as a metaphor for classes and objects. Does the blueprint represent a class, or does it represent an object?

Ashley Jordon
Ashley Jordon
Numerade Educator
02:01

Problem 6

In this chapter, we use the metaphor of a cookie cutter and cookies that are
made from the cookie cutter to describe classes and objects. In this metaphor,
are objects the cookie cutter, or the cookies?

Aditya Sood
Aditya Sood
Numerade Educator
02:40

Problem 7

What is an access specifier?

Adam Conner
Adam Conner
Numerade Educator
01:38

Problem 8

What access specifier is commonly used with a class’s fields?

Aditya Sood
Aditya Sood
Numerade Educator
01:43

Problem 9

When a class variable is said to reference an object, what is actually stored in
the class variable?

Adam Conner
Adam Conner
Numerade Educator
01:34

Problem 10

What does the New key word do?

Margaret Farmer
Margaret Farmer
Numerade Educator
01:24

Problem 11

What is an accessor? What is a mutator?

Brian Lin
Brian Lin
Numerade Educator
02:40

Problem 12

What is a constructor? When does a constructor execute?

Adam Conner
Adam Conner
Numerade Educator
02:40

Problem 13

What is a default constructor?

Adam Conner
Adam Conner
Numerade Educator
01:10

Problem 14

The typical UML diagram for a class has three sections. What appears in these
three sections?

Heather Zimmers
Heather Zimmers
Numerade Educator
00:49

Problem 15

Suppose a class has a field named description. The field’s data type is
String. How would you indicate the field’s data type in a UML diagram?

Aditya Sood
Aditya Sood
Numerade Educator
01:19

Problem 16

What symbols do you use in a UML diagram to indicate private and public
access specification?

Abdul Vahid M
Abdul Vahid M
Numerade Educator
View

Problem 17

What is a problem domain description?

Nicole Hoffman
Nicole Hoffman
Numerade Educator
02:35

Problem 18

What technique was described in this section for finding the classes in a
particular problem?

Alyssa Mae L.
Alyssa Mae L.
Numerade Educator
03:21

Problem 19

What are classes’ responsibilities?

NU
Noor Ul Ain
Numerade Educator
View

Problem 20

What causes an item of data to become stale?

Rashmi Sinha
Rashmi Sinha
Numerade Educator
01:55

Problem 21

In this section, we discussed superclasses and subclasses. Which is the general
class and which is the specialized class?

Anitha Mary
Anitha Mary
Numerade Educator
02:20

Problem 22

What does it mean to say there is an “is a” relationship between two objects?

Shafiq Rehman
Shafiq Rehman
Numerade Educator
02:20

Problem 23

What does a subclass inherit from its superclass?

VS
Vivek Singh
Numerade Educator
01:46

Problem 24

Look at the following pseudocode; which is the first line of a class definition?
What is the name of the superclass? What is the name of the subclass?
Class Canary Extends Bird

Manik Pulyani
Manik Pulyani
Numerade Educator
03:40

Problem 25

Look at the following pseudocode class definitions:
Class Vegetable
Public Module message()
Display "I'm a vegetable."
End Module
End Class
Class Potato Extends Vegetable
Public Module message()
Display "I'm a potato."
End Module
End Class
Given these class definitions, what will the following pseudocode display?
Declare Vegetable v
Declare Potato p
Set v = New Potato()
Set p = New Potato()
Call v.message()
Call p.message()

Harriet O'Brien
Harriet O'Brien
Numerade Educator