M8 Abstraction in Object Oriented Programming

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/19

flashcard set

Earn XP

Description and Tags

Flashcards on abstraction, abstract classes, and interfaces in Java.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

20 Terms

1
New cards

Abstraction

A way of separating the implementation of an interface and one of a design motif of OOP such as encapsulation, Inheritance, Polymorphism, Class, and Object.

2
New cards

Abstraction in Java

Achieved by using interfaces or abstract classes.

3
New cards

Extend Keyword

Used for an abstract class to implement an abstract method with concrete behavior.

4
New cards

Implement Keyword

Used for an interface to implement an abstract method with concrete behavior.

5
New cards

Abstract Class Method Type

Both abstract and non-abstract

6
New cards

Interface Method Type

Abstract method

7
New cards

Abstract Class Method Implementation

Some methods are implemented, while some methods do not implemented but could be override

8
New cards

Interface Method Implementation

All methods are implemented

9
New cards

Abstract Class Inheritance

Single inheritance (A class can be inherit from a single class)

10
New cards

Interface Inheritance

Support multiple inheritance

11
New cards

Abstract Class Representation

An abstract class represents a type of object

12
New cards

Interface Representation

Interface represents a set of behaviors

13
New cards

Abstract Class Access Modifiers

Public, protected, and private are used in abstract class for their methods and properties

14
New cards

Interface Access Modifiers

Only public modifier with methods

15
New cards

Abstract Class Variables

Abstract class can have attributes

16
New cards

Interface Variables

Interface don’t have attributes

17
New cards

Feature of Abstract Class

It can not be instantiated

18
New cards

Feature of Interface

It support polymorphism and multi inheritance

19
New cards

Final Keyword

Immutable objects, it means once an object is created, it cannot be modified

20
New cards

The final keyword

Prevents child classes from overriding a method.