Study Guide v2.0 Flashcards

1
Q

OOP Define.

What is the purpose of OOP?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Name the concepts of OOP in order.

A
Object. 
Class. 
Inheritance.
Polymorphism. 
Abstraction. 
Encapsulation.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Object Define.

A

Any entity that has state and behavior is known as an object. Objects can be physical or logical.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A class is a template for ________ .

A

Objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A ______ defines object properties including a valid range of values, and a default value.

A

Class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

An object is a member, or instance, of a _______.

A

Class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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.

A

Object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Class Define.

A

(Java) Templates that are used to create objects, and to DEFINE object data types and methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Core properties of class include the __________ and ______ that may be used by the object.

A

data types.

methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A blueprint from which you can create an object.

A

Class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which consumes memory, class or object, or both?

A

Object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Two advantages of OOPs over Procedure Oriented Programming.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Is OOP top down or bottom up?

A

bottom up.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Constructor Define.

A

(JAVA) a special method of a class that initializes a newly created object of that type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When is a constructor called?

A

When an object is created.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

In a class, the ‘state’ of an object is represented as a _________. And the ‘behavior’ of an object is represented as a _______.

A

Instance Variable.

Method.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Three types of variables.

A

Instance Variables.
Local Variables.
Class Variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Every class has a ________.

A

Constructor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Default constructor will be called when a new ______ is created.

A

Object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

4 attributes of a constructor.

A
Default constructor is called when new object is created. 
Name exactly same as class name. 
Can have more than 1 constructor. 
No return type.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Default Constructor define.

A

a no-args(No-Argument) constructor that Java compiler inserts on your behalf.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Parameterized Constructor define.

A

A constructor which has a specific number of parameters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

2 advantages of Inheritance.

A

Method Overriding.

Code Reusability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What are the OOP Pillars?

A

Inheritance.
Polymorphism.
Encapsulation.
Abstraction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Inheritance Define.

A

A mechanism in which one object acquires all the properties and behaviors of a parent object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Super/Parent Class. Define and Which OOP Pillar is this attached to?

A
The class whose features are inherited. 
Inheritance.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Reusability. What is this term referring to?

A

The OOP Pillar Inheritance. The idea that classes are reusable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

In Java, what is the keyword used for inheritance?

A

extends.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Sub/Child Class Define.

A

The class that inherits the other class. The subclass can add its own fields and methods in addition to the superclass fields and methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Types of Inheritance in JAVA

A
Single. 
Multilevel. 
Hierarchical. 
Multiple. 
Hybrid.
31
Q

Single Inheritance. Define.

A

Process where a sub class inherits all the properties and behavior of a single super class.

32
Q

Multi-level Inheritance. Define.

A

Process where a sub class inherits all the properties and behaviors of more than one Super Class at multiple levels.

33
Q

Class C inherits properties of Class B and Class A… What type of Inheritance is this?

A

Multi-level Inheritance.

34
Q

Class B inherits properties and behaviors from Class A. What type of inheritance is this?

A

Single Inheritance.

35
Q

Hierarchical Inheritance Define.

A

Process where one or more sub classes inherit all the properties and behaviors of one Super Class.

36
Q

Class B, C, and D Inherit properties and behaviors from Class A. What type of inheritance is this?

A

Hierarchical Inheritance.

37
Q

Hybrid Inheritance.

A

A combination of one or more inheritances.

38
Q

What is the diamond problem referring to?

A

This refers to the multiple inheritance being unable to use in JAVA.

39
Q

How does the IS-HAS principle apply to a BMW Car?

A

The BMW IS a vehicle.

The BMW HAS an engine.

40
Q

Polymorphism define. When does this occur in OOP?

A
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.
41
Q

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?

A

Method Overriding. This is part of polymorphism.

42
Q

When two methods in the class have exactly the same name but take different parameters…

A

Overloading.

43
Q

The process of wrapping code and data together into a single unit.

A

Encapsulation.

44
Q

How can we create a fully encapsulated class in JAVA?

A

By making all the data members of the class private?

45
Q

How can we access an encapsulated class?

A

By using setters and getters.

46
Q

What is used to retrieve the value of a private variable?

A

Getter Method.

47
Q

What is used to change the value of a private variable?

A

Setter Method.

48
Q

Class that has only getter methods?

A

Read-Only Class.

49
Q

Class that has only setter methods?

A

Write-Only Class.

50
Q

Four types of Java access modifiers.

A

Private.
Default.
Protected.
Public.

51
Q

Abstraction Define.

A

Process of hiding the implementation details and showing only functionality to the user.

52
Q

Generalization Define.

A

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.

53
Q

Why you don’t need an abstract keyword in an interface?

A

Every interface is assumed to be abstract.

54
Q

A collection of abstract methods.

A

An interface.

55
Q

Specialization define.

A

creating new subclasses from an existing class.

56
Q

An abstract class can NOT be instantiated. T/F?

A

True.

57
Q

Collection of information that is organized so that it can be easily accessed, managed, and updated.

A

Database.

58
Q

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.

A

Relational database.

59
Q

A program that allows you to create, update, and administer a relational database.

A

Relational database management system.

60
Q

What language does a relational database management system (RDBMS) use?

A

SQL.

61
Q

Programming language used to communicate with data stored in a relational database management system.

A

SQL.

62
Q

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.

A

SQL.

63
Q

A field in a table which uniquely identifies each row/record in a database table.

A

Primary Key.

64
Q

When mulitple fields are used as a primary key, they are called a ________.

A

Composite key.

65
Q

Key used to link two tables together.

A

Foreign Key/Referencing Key.

66
Q

A column or combination of columbs whose values match a primary key in a different table.

A

Foreign Key.

67
Q

SQL statement used to add new rows of data to a table in the database.

A

INSERT INTO.

68
Q

SQL Clause used to combine records from two or more tables in a database.

A

Joins.

69
Q

The programming language for the web?

A

Javascript.

70
Q

This programming language can update and change both HTML and CSS.

A

Javascript.

71
Q

This programming language can calculate, manipulate, and validate data.

A

Javascript.

72
Q

In programming, ________ are used to store data values.

A

Variables.

73
Q

Javascript uses the _____ keyword to declare variables.

A

var.

74
Q

In javascript, a _____ sign is used to assign values to variables.

A

=