Study Guide v2.0 Flashcards
OOP Define.
What is the purpose of OOP?
Object Oriented Programming.
Methodology or paradigm to design a program using classes and objects.
The purpose is to simplify software development and maintenance by providing some concepts.
Name the concepts of OOP in order.
Object. Class. Inheritance. Polymorphism. Abstraction. Encapsulation.
Object Define.
Any entity that has state and behavior is known as an object. Objects can be physical or logical.
A class is a template for ________ .
Objects.
A ______ defines object properties including a valid range of values, and a default value.
Class.
An object is a member, or instance, of a _______.
Class.
A(n) _______ has a state in which all of its properties have values that you either explicitly define or that are defined by default settings.
Object.
Class Define.
(Java) Templates that are used to create objects, and to DEFINE object data types and methods.
Core properties of class include the __________ and ______ that may be used by the object.
data types.
methods.
A blueprint from which you can create an object.
Class.
Which consumes memory, class or object, or both?
Object.
Two advantages of OOPs over Procedure Oriented Programming.
OOP makes development and maintenance easier, it can scale with growth of project.
OOP provides data hiding, in procedure-oriented programming data can be accessed from anywhere.
Is OOP top down or bottom up?
bottom up.
Constructor Define.
(JAVA) a special method of a class that initializes a newly created object of that type.
When is a constructor called?
When an object is created.
In a class, the ‘state’ of an object is represented as a _________. And the ‘behavior’ of an object is represented as a _______.
Instance Variable.
Method.
Three types of variables.
Instance Variables.
Local Variables.
Class Variables.
Every class has a ________.
Constructor.
Default constructor will be called when a new ______ is created.
Object.
4 attributes of a constructor.
Default constructor is called when new object is created. Name exactly same as class name. Can have more than 1 constructor. No return type.
Default Constructor define.
a no-args(No-Argument) constructor that Java compiler inserts on your behalf.
Parameterized Constructor define.
A constructor which has a specific number of parameters.
2 advantages of Inheritance.
Method Overriding.
Code Reusability.
What are the OOP Pillars?
Inheritance.
Polymorphism.
Encapsulation.
Abstraction.
Inheritance Define.
A mechanism in which one object acquires all the properties and behaviors of a parent object.
Super/Parent Class. Define and Which OOP Pillar is this attached to?
The class whose features are inherited. Inheritance.
Reusability. What is this term referring to?
The OOP Pillar Inheritance. The idea that classes are reusable.
In Java, what is the keyword used for inheritance?
extends.
Sub/Child Class Define.
The class that inherits the other class. The subclass can add its own fields and methods in addition to the superclass fields and methods.