OOP Flashcards


Set Details Share
created 9 months ago by Memecabardo_17
3 views
Subjects:
programming
show moreless
Page to share:
Embed this setcancel
COPY
code changes based on your size selection
Size:
X
Show:

1

a computer programming model that organizes software design around data, or objects, rather
than functions and logic.

OBJECT - ORIENTED PROGRAMING

2

It is a way of thinking about and structuring a program's functionality.

PROGRAMMING PARADIGM

3

What are the most common programming paradigm today?

OOP

PROCEDURAL PROGRAMMING

FUNCTIONAL PROGRAMMING

4

These are user-defined data types that act as the blueprint for individual objects, attributes and
methods.

CLASSES

5

These are functions that are defined inside a class that describe the behaviors of an object.

METHODS

6

are defined in the class template and represent the state of an object. Objects will have data
stored in the attributes field.

ATTRIBUTES

7

The additional benefits of OOP

SCALABILITY, CODE REUSABILITY, AND EFFICIENCY

8

The first step in OOP is to collect all of the objects a programmer wants to manipulate and
identify how they relate to each other.

DATA MODELLING

9

information is represented as classes that describe the concepts of the problem
domain and the logic of the application. Classes define the methods that determine
how information is handled

OOP

10

the structure of the program is formed by functionality
desired for the program: the program acts as a step-by-step guide for the functionality
to be performed.

PROCEDURAL PROGRAMMMING

11

uses immutable data to tell the program exactly what
to do

FUNCTIONAL PROGRAMMING

12

this is where the state of an object can, in principle, change with any object method, and that change of state can also affect the working of the methods of other objects.

OOP

13

This is where the state of the program is maintained in variables and tables, and any methods handle only the values provided to them as parameters.

PROCEDURAL PROGRAMMING

14

aims to hide complexity from users and show them only relevant information.

ABSTRACTION

15

helps with data security, allowing you to protect the data stored in a class from system-wide access. As the name suggests, it safeguards the internal contents of a class like a
capsule.

ENCAPSULATION

16

makes it possible to create a child class that inherits the fields and methods of the parent class. The child class can override the values and methods of the parent class, but it’s not
necessary. It can also add new data and functionality to its parent.

INHERITANCE

17

Parent classes are also called...

SUPERCLASS

18

Child classes are known...

SUBCLASS

19

refers to the ability to perform a certain action in different ways.

POLYMORPHISM

20

it happens when various methods with the same name are present in a class.

METHOD OVERLOADING

21

occurs when a child class overrides a method of its parent.

METHOD OVERRIDING

22

means the act of establishing a relationship between two unrelated classes.

ASSOCIATION

23

s a narrower kind of association. It occurs when there’s a one-way (HAS-A) relationship between the two classes we associate through their objects

AGGREGATION

24

a stricter form of aggregation. It occurs when the two classes you associate are mutually dependent and can’t exist without each other.

COMPOSITION

25

a standardized modeling language consisting of an integrated set of diagrams, developed to help system and software developers for specifying, visualizing, constructing, and documenting the artifacts of software systems, as well as for business modeling and other non-software systems.

Unified Modeling Language (UML)

26

how to instantiate an object?

className ObjName = new className ();

27

what keyword to use in order to prevent a class attribute from being overridden

final keyword

28

We can create our own method based on our
requirements.

User-defined Methods

29

These are built-in methods in Java that are available
to use.

Standard Library Methods

30

It defines access types whether the method is public, private, and so on.

MODIFIER

31

We use this word so it can be accessed without creating objects

static

32

These are values passed to a method. We can pass any
number of arguments to a method.

parameters

33

- It specifies what type of value a method returns. For example if a method has an int return type then it returns an integer value

returnType

34

- It is an identifier that is used to refer to the particular method in a program.

methodName

35

- It includes the programming statements that are used to perform some tasks. The method body is enclosed inside the curly braces { }.

methodBody

36

how to create method?

publicvoid sing () {

System.out.println("lalalaalalala");

}

37

used to get the value of a private field

Accessors/getter

38

used to set the value of a private
field

Mutators/setter

39

how to implement getter ?

public String getName() {

return name;

}

40

how to implement setter?

public void setName (String newName) {

this.name = newName;

}

41

It just signals to the compiler that it is the field named number that is being referred to.

this.

42

what keyword use when implementing inheritance?

extends

43

used to call the method of the parent class from the method of the child class. The method of the parent class will be called using this keyword.

super

44

type of inheritance that extends from a single superclass.

single inheritance

45

type of inheritance extends from a superclass and then the same subclass acts as a superclass for another class.

multi-level inheritance

46

type of inheritance where multiple subclasses extend from a single superclass

hierarchical inheritance

47

type of inheritance a single subclass extends from multiple superclasses.

multiple inheritance

48

a combination of hierarchical and multiple inheritance,
where a class inherits from multiple classes, some of which are derived from a common base class.

hybrid inheritance

49

An abstract method is a method without a
body, and it is declared using the "_____________" keyword.

abstract

50

A variable is called __________ if it refers to different values under different conditions.

polymorphic

51

what keyword to create an interface in Java.

interface

52

We use the __________ keyword to
implement an interface

implements

53

what do we called this method where we can now add methods with implementation inside an interface

default method