OOP Flashcards

(36 cards)

1
Q

Constructors

A

The functions that create new objects

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

Default constructor

A

The function that is automatically made when you create a class

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

Parameterized constructor

A

A specific function you make for a class.

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

Constructor Overloading

A

Creating multiple constructors for a class

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

Inheritance

A

A child/subclass getting all objects and properties of parent/superclass.

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

Single inheritance

A

One subclass and one superclass

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

Multilevel Inheritance

A

A grandfather class, a parent & child class, and a child only class

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

Hierarchial inheritance

A

Multiple child classes, one parent class

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

Polymorphism

A

The nature of a child class being able to operate as its parent class

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

Encapsulation

A

Setting things to public or private, making objects only use their own stuff. Compartmentalisation

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

Abstraction

A

Making tools within the code, not for the end product.

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

Generalization

A

Reverse Inheritance, making a class out of the characteristics of other classes

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

Abstract class

A

A class that isn’t used, only inherited. You must begin with Abstract when making it

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

Abstract method

A

An unimplemented method with abstract

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

Switch

A

Like a logical statement, but with many diferent cases. Like what I did with the project for Abba

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

Do While Loop

A

Like a While Loop, except it always executes once.

17
Q

Enhanced For Loop

A

A for loop for arrays

18
Q

This()

A
Refers to the class in a class 
Refers to the method in a method
19
Q

new()

A

An operator used when making new object

20
Q

super()

A

refers to the parent class

21
Q

Interface

A

Like a class; an entirely insubstantiated set of methods

22
Q

Collection

A

Like an array, but can store different types of items and doesn’t have a set number.

23
Q

ArrayList

A

Inherits AbstractList. Like an array, but can grow and shrink. Can’t store primitives, needs a wrapper. Slower than an array.

24
Q

Set

A

A Set is a Collection that cannot contain duplicate elements. It models the mathematical set abstraction.
The Set interface contains only methods inherited from Collection and adds the restriction that duplicate elements are prohibited.

25
Map
The equivalent of a Dictionary in Python
26
Method Overloading
Creating multiple methods with the same names but different parameters
27
Four Pillars of OOP
Inheritance Polymorphism Encapsulation Abstraction
28
Reusability
A mechanism which facilitates reuse of the fields and methods of the existing class when you create a new class. You can use the same fields and methods already defined in the previous class
29
Method Overriding
Creating a new way to use the parent class's method
30
Array
A collection of primitive data organized with an index. They have a fixed data type and size.
31
Multidimensional array
An array of arrays
32
Static
A keyword that makes a variable fixed, a global variable for all members of that class
33
Getter/accesser
Method that reads info from a private object. Made with public keyword
34
Setter/mutator
Method taht changes a private object. Made with pubic keyword
35
Protected
Only accessible in the same package and subclasses
36
Final
A keyword that makes the method impossible to overide