OOP Fundamentals Pt 1

0.0(0)
studied byStudied by 0 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/46

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

47 Terms

1
New cards

abstraction, polymorphism, inheritance, encapsulation

4 fundamental concepts of oop (a-pie)

2
New cards

abstracting

when we put a piece of code in a java method, we are ______ the piece of code

3
New cards

implemented

the method’s name can be considered a new concept; we won’t need to know how the method was ______ when reusing it

4
New cards

name, arguments, return values

a method’s interface includes what?

5
New cards

true

T/F: abstractions can have different methods

6
New cards

pure methods

methods that don’t call other methods

7
New cards

first

pure methods belong to the ____ level of abstraction

8
New cards

second

a method that calls other methods belongs at least to the ____ level of abstraction

9
New cards

abstraction

the ability to separate the interface from the implementation

10
New cards

readability, usability, reusability, maintainability

abstraction benefits

higher ____, ____, ____, ____

11
New cards

simplifies, unnecessary 

abstraction ___ complex system by hiding ____ details

12
New cards

method, class, package

abstraction levels

  1. putting code in a ____

  2. putting several methods in a ____

  3. putting classes in a _____

13
New cards

true

T/F: inheritance is a two-way ability

14
New cards

is-a

inheritance is an ____ relationship

15
New cards

child, defines, capabilities

1. The ability of extending a parent class' capabilities by creating a ___ class that gets all parent's capabilities and possibly ______ more.

2. The ability of factoring out the common _____ of a group of classes (children) into a parent class.

16
New cards

parent-chlid

the term______ is more common in database than superclass-subclass

17
New cards

object

every Java class inherits from a parent class called _____

18
New cards

parent

more generalized and is called “superclass”

19
New cards

class

more specific and is called “subclass”

20
New cards

inherited, class member

constructors cannot be _____ because it’s not a _____

21
New cards

overriding

re-implementing an inherited method in the subclass

22
New cards

extends

Java uses the ____ keyword to denote inheritance

23
New cards

asymmetric

inheritance is an ____ relationship (every child is a parent but not the other way around)

24
New cards

inherits

ClassA _____ from ClassB

<p>ClassA _____ from ClassB</p>
25
New cards

true

T/F: in a UML diagram, the child class only shows the non-inherited (new) methods

<p>T/F: in a UML diagram, the child class only shows the non-inherited (new) methods</p>
26
New cards

+

which sign stands for the public?

27
New cards

-

which sign stands for private?

28
New cards

#

which sign stands for protected?

29
New cards

~

which sign stands for package private?

30
New cards

visible

all ____ member of superclass are inherited by _____

31
New cards

true, bad

T/F: we can declare the same instance variable name of superclass in subclass. However, this is ___ practice.

32
New cards

super(…)

____ must be the first statement of the subclass constructor

33
New cards

zero-parameter constructor

if you don’t any superclass’ constructor, then by default the  ____ of the superclass will be called

34
New cards

T/F: if you don’t have any constructor in your class, Jaa creates a zero-parameter constructor for you

35
New cards

aren’t, special

constructors ____class members, that’s why we need a ___ way to call it from subclass

36
New cards

this

inside a class, we can invoke its members by using the keyword _______

37
New cards

super

use the ____ keyword when we invoke a superclass method

38
New cards

optional

if a method is not overridden, using the super keyword is ____ (but it’s good programming practice)

39
New cards

multiple inheritance

to have two or more direct superclasses

40
New cards

isn’t, increases

multiple inheritance ____ supported by Java bc it ___ the complexity of programming

41
New cards
42
New cards

final

if a class is tagged as ____, then it cannot be extended

43
New cards

String

the ____ class in Java is final

44
New cards

overrriden

if a method is tagged as final, then it cannot be _____

45
New cards

attribute

if an ____ is tagged as final, then it cannot be changed

46
New cards

constructors

______ cannot be tagged as final

47
New cards

inheritance, aggregation

_____ decreases readability, avoid overusing it (use ___ instead)