718
Chapter 6 Exam Preparation Exercises
1.Object-oriented design focuses on the data objects in the problem; functional de-
composition focuses on the tasks in the problem.
4.Class method
6.The public interface of a class consists of the members of a class that can be
accessed outside of the class, together with the modes of access that are specified
by other modifiers.
7.To protect the class members from being accessed directly by a client application
13.The goal of brainstorming is to come up with a potential list of classes.
16.Built-in or library classes may be identified during the brainstorming phase. We
do not need to make CRC cards for them or the classes removed during the filter-
ing phase.
19.When a class has no unfilled responsibilities, it becomes inactive.
22.To indicate that a class is just a variation, the original class is listed as the super-
class.
25.Absolutely
28.A computer virus is code that replicates itself, often with the goal of spreading to
other computers without authorization, and possibly with the intent of doing
harm.
30.Self-documenting code is application code containing meaningful identifiers as
well as judiciously used clarifying comments.
- a. A compilation unit is made up of optional package and import statements and
a class declaration(s).
b.No
c. In a file
d A file containing a compilation unit is named by the public class with a .java
extension.
e.Ye s