OOP Midterms Flashcards

1
Q

Can be inherited but not instantiated

A

Abstract Class

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

method only for abstract class, methods that don’t require implementation for its declaration.

A

Abstract Method

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

All subclass should implement the abstract method

A

Method Signature

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

If class is abstract have abstract method

A

Realization

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

Cant be inherited but can instantiate

A

Final Class

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

Cannot be override by connected classes

A

Final method

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

Classes that implement an interface inherits only method signature

A

Interface Inheritance

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

Key word used for implementing interface

A

“implements”

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

Constant and prevents the reference from changing, vallue can be changed but not the size

A

Final Variable

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

Object that groups multiple elements into a single unit

A

Java Collections

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

Collection framework 3 elements

A

Interface
Implementations
Algorithms

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

It is how you handle the collections

A

Interfaces

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

The classes that actually hold the data

A

Implementations

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

Useful routines

A

Algorithms

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

Enforce type on the collection

A

Generics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  • stores elements in order added
  • similar to array but growable
  • allows to get and set using index
  • fast in getting and setting elements
  • slow in inserting and removing elements
A

List Collection

17
Q
  • no duplicate
  • maintain its order
A

Set collection

18
Q

Not sorted set

19
Q

Sorted set

20
Q

An object that map keys to values

A

Map Collection

21
Q

Not sorted map collection

22
Q

Sorted Map collection

23
Q

was used to provide generic iteration for collection implementations

24
Q

How to determine class of an object

A

getClass()

25
a nested class and it doesn't need the reference of the outer class.
Static class
26
there is only one copy of the variable in memory, regardless of how many instances of the class are created.
Static Variables
27
used to check whether an object is an instance of a particular class or implements a particular interface.
InstanceOf
28
allocates a memory location for the object and returns reference of the memory location
New Operator
29
a number pointing to a memory location
Reference
30
parameter passing
- pass-by-value - pass-by-reference
31
garbage collection an object loses a reference when:
- reference goes out of scope - reference is pointed to another object - reference is pointed to null
32
belongs to the class as a whole, not to a certain class
Static Members | use keyword: (static)