DCIT50 - Lecture 4-6

0.0(0)
studied byStudied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/24

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:57 AM on 1/20/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

25 Terms

1
New cards

Encapsulation

A way of keeping things organized in programming

2
New cards

Encapsulation, Class

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

3
New cards

Encapsulation

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

4
New cards

protect important data

We use encapsulation to __ and keep things simple

5
New cards

control how it’s accessed or modified

We use encapsulation whenever we need to protect data and __

6
New cards

exposing only what’s necessary

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

7
New cards

private

When using encapsulation, we declare attributes as __

8
New cards

Setter

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

9
New cards

invalid or unexpected values

Without a setter, the variable might be changed to __

10
New cards

Getter

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

11
New cards

provides safe access

Getters __ to the variable without directly exposing it

12
New cards

Polymorphism

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

13
New cards

Poly (many) and Morph (forms)

Polymorphism comes for the Greek words __

14
New cards

method overriding and method overloading

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

15
New cards

Method overloading

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

16
New cards

Method overriding

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

17
New cards

Abstraction

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

18
New cards

cannot be instantiated

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

19
New cards

Abstract method

Can only be declared inside an abstract class

20
New cards

Abstract method

A method without a body and needs to be overriden

21
New cards

Interface

Is like a contract or a blueprint

22
New cards

Interface

Are used to achieve 100% abstraction

23
New cards

static and final

In abstraction, any variable that you declare would be __

24
New cards

default modifier

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

25
New cards

Implements keyword

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