Latest Version |Already Graded A+
Procedural programming ✔Correct Answer-focus is on the process. Procedures/functions are
written to process data
Object-oriented programming ✔Correct Answer-focuses on nouns, creating a new data type
within the program that has attributes and verbs
Class ✔Correct Answer-a template to build a specific type of object. Like a blueprint
Object ✔Correct Answer-a specific instance of a class that can store data and perform specific
actions
Attributes (or Fields) ✔Correct Answer-data about a class. Almost always private
Methods (or Behaviors) ✔Correct Answer-actions a class can perform. Usually public, but we
can have private helper methods
Public ✔Correct Answer-when the public access specifier is applied to a class member, the
member can be accessed by code inside the class or outsie
Private ✔Correct Answer-when the private access specifier is applied to a class member, the
member cannot be accessed by code outside the class. The member can be accessed only by
methods that are members of the same class
Data Hiding ✔Correct Answer-an object hides its internal, private fields from code that is
outside the class that the object is an instance of
Importance of Data Hiding ✔Correct Answer-classes are typically used as components in large
software systems, involving a team of programmers. Helps enforce the integrity of an object's
internal data
Accessors (or get methods) ✔Correct Answer-allow you to retrieve the values inside the
attributes
Mutators (or set methods) ✔Correct Answer-allow you to modify the values inside the
attributes
Stale Data ✔Correct Answer-occurs when we store the result of a calculation. Impractical.
Avoid by calculating the value of that data within a method rather than store it in a variable
, Constructor ✔Correct Answer-automatically called by Java when the keyword new is executed
set up methods that tell Java what values to put into the object at the time it is created
has the same name as the class (required)
no return type
No-arg constructor ✔Correct Answer-constructor that takes no arguments
Default Constructor ✔Correct Answer-if no constructor is provided, Java will create a default
constructor for you that sets all primitive values to 0 or false, and all objects to null.
Method Signature ✔Correct Answer-created through the method name and the data types of
the parameter list
Binding ✔Correct Answer-how the compiler knows which method to call
Shadowing ✔Correct Answer-creating a local variable the same name as an attribute in the
class
the local variable hides the attribute
uses the "this" reference
"this" reference ✔Correct Answer-"this" can be used to overcome shadowing and allow a
parameter to have the same name as an instance field
Equals method ✔Correct Answer-a method Java expects every class to have
returns a boolean and takes a parameter of the same type as the class in which it resides
toString method ✔Correct Answer-a method Java expects every class to contain
returns a String representation of the object. Takes no paramters
UML ✔Correct Answer-Unified Modeling Language
graphical language to represent object oriented systems
UML Class Diagram ✔Correct Answer-Rectangle with three defined areas:
Top area: Class name
Middle area: Attributes/fields
Bottom area: Methods