1 - OOP

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

1/29

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.

30 Terms

1
New cards

Model, map, reuse, extend

What is the OOP model?

2
New cards
  • Model the real world problem to user’s perceive;

  • Use similar metaphor in computational env.

  • Construct reusable components;

  • Create new components from existing ones.

Explain OOP’s model, map, reuse, and extend

3
New cards
  • Encapsulation

  • Data Abstraction

  • Single Inheritance

  • Polymorphism

  • Persistence

  • Delegation

  • Genericity

  • Multiple Inheritance

Java’s Object Oriented Features

4
New cards

Encapsulation

It associates the code and the data it manipulates into a single unit; and keeps them safe from external interference and misuse.

5
New cards

Data Abstraction

The technique of creating new data types that are well suited to an application. It allows the creation of user defined data types, having the properties of built data types and a set of permitted operators.

6
New cards

No, Java only has partial support

Does Java have full support for Data Abstraction?

7
New cards

Abstract Data Type (ADT)

  • A structure that contains both data and the actions to be performed on that data.

8
New cards

Class is an implementation of an Abstract Data Type.

Example of an implemention of an ADT?

9
New cards

Class

a set of attributes and operations that are performed on the attributes.

10
New cards

Object Oriented System

A collection of interacting Objects

11
New cards

Object

An instance of a class

12
New cards

represents a template for several objects that have common properties.

A class represents what?

13
New cards

all the properties common to the object  -  attributes  and methods.

A class defines what?

14
New cards

The object’s type

A class is sometimes called what?

15
New cards

Encapsulation

  • All information (attributes and methods) in an object oriented system are stored within the object/class.

  • Information can be manipulated  through operations performed on the object/class – interface to the class. Implementation is hidden from the user.

  • Object support Information Hiding – Some attributes and methods can be hidden from the user.

16
New cards

Abstraction

What is being depicted in the example?

<p>What is being depicted in the example?</p>
17
New cards

Inheritance

  • New data types (classes) can be  defined as extensions to previously defined types.

18
New cards

Super Class

Term for parent class

19
New cards

Sub Class

Term for the child class

20
New cards

If multiple classes have common attributes/methods,  these  methods can be moved to a common class - parent class. This allows reuse since the implementation is not repeated.

How can Inheritance be implemented in terms of reusing?

21
New cards

Specialization

Specialized behavior can be added to the child class. The behavior will be implemented in the child class

Ex. area() method in the child classes override the method in parent classes

22
New cards

Common Interface

  • Some methods have common implementation and others don’t.

  • defines a set of methods that multiple, distinct classes can implement. This allows these classes, despite their different internal implementations, to be treated polymorphically based on their shared adherence to the interface's contract.

23
New cards

Extension

  • Extend functionality of a class.

  • Child class adds new operations to the parent class but does not change the inherited behavior.

24
New cards

Multiple Inheritance

Inherit properties from more than one class.

25
New cards

Not supported in Java

Does Java support multiple inheritance

26
New cards

Polymorphism

Allow a single  object, method, operator associated with different meaning depending on the type of data passed to it.

27
New cards

Method Overloading

  • Multiple methods can be defined with the same name, different input arguments.

Method 1 - initialize(int a)

Method 2 - initialize(int a, int b)

28
New cards

Persistence

The phenomenon where the object outlives the program execution.

29
New cards
  • Greater Reliability

  • Maintainability

  • Greater Productivity through Reuse!

  • Faster Design and Modelling

Why OOP?

30
New cards
  • Object Oriented Systems can be easily upgraded from small to large systems.

  • Message-Passing technique for communication  between objects make the interface descriptions with external systems much simpler.

  • Software complexity can be easily managed.

Benefits of OOP