Object Orientated Program Flashcards

1
Q

Reason for OOP

A

Breaks code down into smaller modules with states and functionality

I.e. class solely for customers and another for food choice

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

Modularity

A

OOP enabled programmers to create modules, no change for when an object is added

Easy to Create new object

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

Scalability

A

OOP makes development and maintenance easier.

Design is modular, part can be updated without large scale changes

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

Data hiding

A

OOP can hide and secure data

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

Real life scenario

A

OOP can simulate real world

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

Set up for OOP

A

Class needs details and functionalities

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

Class needs

A

Attributes (variables)

Can be string and long

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

Access modifier

A

Keywords used to define the state of a data type

I.e public 
 Determines how an attribute, class and method can be edited
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Access modifiers can be applied to what?

A

Class, attributed and methods

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

Public vs private

A

Public: members can access in other classes

Prívate: only can access inside that specific class

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

Object

A

Containments of the class

“Instance if a class”

Holds data for every variable of a class, NOT PRIMITIVE DATA TYPES

Use of a class == object

    Stud stud = new stud();
                                ^This is new object 
 Stud stud1 = stud;
                   ^ this is reference variable not obj
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Class vs method naming

A

Class is Pascal: CustomorInfo

Method is camal: customerInfo

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

Calling an object

A

= new class(parameters);

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