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.
Types of Inheritance in JAVA
Single. Multilevel. Hierarchical. Multiple. Hybrid.
Single Inheritance. Define.
Process where a sub class inherits all the properties and behavior of a single super class.
Multi-level Inheritance. Define.
Process where a sub class inherits all the properties and behaviors of more than one Super Class at multiple levels.
Class C inherits properties of Class B and Class A… What type of Inheritance is this?
Multi-level Inheritance.
Class B inherits properties and behaviors from Class A. What type of inheritance is this?
Single Inheritance.
Hierarchical Inheritance Define.
Process where one or more sub classes inherit all the properties and behaviors of one Super Class.
Class B, C, and D Inherit properties and behaviors from Class A. What type of inheritance is this?
Hierarchical Inheritance.
Hybrid Inheritance.
A combination of one or more inheritances.
What is the diamond problem referring to?
This refers to the multiple inheritance being unable to use in JAVA.
How does the IS-HAS principle apply to a BMW Car?
The BMW IS a vehicle.
The BMW HAS an engine.
Polymorphism define. When does this occur in OOP?
The ability of an object to take on many forms. In OOP occurs when a parent class reference is used to refer to a child class object.
What is it called when the same method in a child class has a different result than in the parent class? Which OOP pillar does this involve?
Method Overriding. This is part of polymorphism.
When two methods in the class have exactly the same name but take different parameters…
Overloading.
The process of wrapping code and data together into a single unit.
Encapsulation.
How can we create a fully encapsulated class in JAVA?
By making all the data members of the class private?
How can we access an encapsulated class?
By using setters and getters.
What is used to retrieve the value of a private variable?
Getter Method.
What is used to change the value of a private variable?
Setter Method.
Class that has only getter methods?
Read-Only Class.
Class that has only setter methods?
Write-Only Class.
Four types of Java access modifiers.
Private.
Default.
Protected.
Public.
Abstraction Define.
Process of hiding the implementation details and showing only functionality to the user.
Generalization Define.
Process of extracting shared characteristics from two or more classes, and combining them into a generalized super class. Shared characteristics can be attributes, associations, or methods.
Why you don’t need an abstract keyword in an interface?
Every interface is assumed to be abstract.
A collection of abstract methods.
An interface.
Specialization define.
creating new subclasses from an existing class.
An abstract class can NOT be instantiated. T/F?
True.
Collection of information that is organized so that it can be easily accessed, managed, and updated.
Database.
Type of database that uses a structure which allows us to identify and access data in relation to another piece of data in the database. Often organized into tables.
Relational database.
A program that allows you to create, update, and administer a relational database.
Relational database management system.
What language does a relational database management system (RDBMS) use?
SQL.
Programming language used to communicate with data stored in a relational database management system.
SQL.
This programming language allows:
Users to create and drop databases and tables.
Users to create view, stored procedure, functions in a database.
Useres to set permissions on tables, procedures and views.
SQL.
A field in a table which uniquely identifies each row/record in a database table.
Primary Key.
When mulitple fields are used as a primary key, they are called a ________.
Composite key.
Key used to link two tables together.
Foreign Key/Referencing Key.
A column or combination of columbs whose values match a primary key in a different table.
Foreign Key.
SQL statement used to add new rows of data to a table in the database.
INSERT INTO.
SQL Clause used to combine records from two or more tables in a database.
Joins.
The programming language for the web?
Javascript.
This programming language can update and change both HTML and CSS.
Javascript.
This programming language can calculate, manipulate, and validate data.
Javascript.
In programming, ________ are used to store data values.
Variables.
Javascript uses the _____ keyword to declare variables.
var.
In javascript, a _____ sign is used to assign values to variables.
=