Module 1 - OOP Concepts Flashcards

1
Q

What does OOP stand for?

A

Object-Oriented Programming

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is Procedural programming?

A

about writing procedures or methods that perform operations on the data,

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Object-oriented programming?

A

about creating objects that contain both data and methods.​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Object Oriented programming is a programming style which is associated with the concepts like_________________
(6 items)

A

class,
object,
Inheritance,
Encapsulation,
Abstraction,
Polymorphism.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are samples of procedural-oriented programming

A

C, Fortran, Cobol and Pascal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Give the 3 problem solving phases

A
  1. Analysis
  2. General solution
  3. Verify
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In problem solving phases, what is “Analysis”?

A

Define problem and what solution must do

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In problem solving phases, what is “General Solution”?

A

Develop logical sequence of steps to solve problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In problem solving phases, what is “Verify”?

A

Follow steps - by hand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the sequence structure?

A

series of processes carried out one after the other. Each instruction is executed in a serial manner, one after another.​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 4 advantages of OOP?

A
  1. OOP is faster and easier to execute.​
  2. It provides clear structure for the programs.​
  3. Help us to keep the Java code DRY “Don’t Repeat Yourself”, and makes the code easier to maintain, modify and debug.
  4. OOP makes it possible to create full reusable applications with less code and shorter development time.​
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The “Don’t Repeat Yourself (DRY)” principle is about ____________

A

reducing the repetition of code. You should extract out the codes that are common for the application and place them at a single place and reuse them instead of repeating it.​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is “class” in OOP?

A

encapsulates both the static properties and dynamic operations within a “box” and specifies the public interface for using these boxes. ​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Java – What are Classes

A

Class – is like an object constructor, or a “blueprint” for creating objects.​

To create a class, use the keyword class:​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Java – What are Objects?​

A

Object – In Java, an object is created from a class. Continuing with the example awhile ago we created the class named MyClass, so now we can use this to create objects.​


To create an object of Myclass, specify the class name, followed by the object name, and use the keyword new: ​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

In Creating objects and classes​, what is “Declaration” ?

A

Declaration − A variable declaration with a variable name with an object type.​

17
Q

In Creating objects and classes​, what is “Instantiation “ ?

A

Instantiation − The ‘new’ keyword is used to create the object.​

18
Q

In Creating objects and classes​, what is “Initialization” ?

A

Initialization − The ‘new’ keyword is followed by a call to a constructor. This call initializes the new object.

19
Q

OP languages permit higher level of abstraction for solving real-life problems.

A

higher level of abstraction

20
Q

give the 3 benefits of using OOP

A

-Ease in software design​

-Ease in software maintenance:​

-Reusable software

21
Q

in Java, a class is____

A

definition of objects of the same kind.

it is a blueprint, template, or prototype that defines and describes the static attributes and dynamic behaviors common to all objects of the same kind.

22
Q

This term usually refers to instance

A

“object”

23
Q

In Java, an Instance is ___________

A

a realization of a particular item of a class. In other words, an instance is an instantiation of a class.​

24
Q

what are the 3 compartments of a box?

A
  1. Name (or identity): identifies the class.​
  2. Variables (or attribute, state, field): contains the static attributes of the class.​
  3. Methods (or behaviors, function, operation): contains the dynamic behaviors of the class.
25
Q

give the 3 parts to creating a class

A

-An optional access modifier​

-The keyword class​

-Any legal identifier you chose for the name of your class

example:
public class Employee

26
Q

_____________________frequently instantiate objects that use the objects of other classes (and their data and methods). Sometimes you write classes that do both. ​

A

Application classes

27
Q

A non-static field is an ______________

A

instance variable

28
Q
A