DCIT50 - Lecture 4-6

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 24

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

25 Terms

1

Encapsulation

A way of keeping things organized in programming

New cards
2

Encapsulation, Class

It means wrapping data (variables) and data (methods) in a single unit, called what?

New cards
3

Encapsulation

Hides the internal details and allows only specific parts to be accessed

New cards
4

protect important data

We use encapsulation to __ and keep things simple

New cards
5

control how it’s accessed or modified

We use encapsulation whenever we need to protect data and __

New cards
6

exposing only what’s necessary

Encapsulation is useful when you want to simplify how others use your code by __

New cards
7

private

When using encapsulation, we declare attributes as __

New cards
8

Setter

A method used to set or update the value of a private variable in a class

New cards
9

invalid or unexpected values

Without a setter, the variable might be changed to __

New cards
10

Getter

A method used to retrieve or “get” the value of a private variable

New cards
11

provides safe access

Getters __ to the variable without directly exposing it

New cards
12

Polymorphism

The ability of a single function, method, or object to take on different forms

New cards
13

Poly (many) and Morph (forms)

Polymorphism comes for the Greek words __

New cards
14

method overriding and method overloading

Polymorphism allows a single interface to represent different types of objects or behaviors through __

New cards
15

Method overloading

Occurs when multiple methods in the same class have same name but different parameter lists

New cards
16

Method overriding

Occurs when a subclass provides a specific implementation for a method that is already defined in its parent class

New cards
17

Abstraction

The process of hiding unnecessary details and showing only the essential features of an object or a concept

New cards
18

cannot be instantiated

Abstract classes __ because it is designed to serve as a blueprint for other classes

New cards
19

Abstract method

Can only be declared inside an abstract class

New cards
20

Abstract method

A method without a body and needs to be overriden

New cards
21

Interface

Is like a contract or a blueprint

New cards
22

Interface

Are used to achieve 100% abstraction

New cards
23

static and final

In abstraction, any variable that you declare would be __

New cards
24

default modifier

Inside an abstract method, you can use the __ to create a method with a body

New cards
25

Implements keyword

Used after the class name to implement an interface in that certain class

New cards
robot