Revarture OOP

Primary tabs

Abdelraheem Al-najjar Raheem's picture

Object Oriented Programming Flash Cards

Subjects: 

Bookmark to learn: Login to use bookmarks.

Bookmark to learn: Login to use bookmarks.

Add to collection ... add Revarture OOP to your collections:

Help using Flashcards ...just like in real life ;)

  1. Look at the card, do you know this one? Click to flip the card and check yourself.
  2. Mark card Right or Wrong, this card will be removed from the deck and your score kept.
  3. At any point you can Shuffle, Reveal cards and more via Deck controls.
  4. Continue to reveal the wrong cards until you have correctly answered the entire deck. Good job!
  5. Via the Actions button you can Shuffle, Unshuffle, Flip all Cards, Reset score, etc.
  6. Come back soon, we'll keep your score.
    “Repetition is the mother of all learning.”
  7. Signed in users can Create, Edit, Import, Export decks and more!.

Bookmark to learn: Login to use bookmarks.

Share via these services ...

Email this deck:

Right: #
Wrong: #
# Right & # Wrong of #

Any entity that has state and behavior

Object

An Object can be defined as an instance of a -?

Class

An object contains an address and takes up some space in -?

Memory

What two purposes do classes, in the context of java, serve?

Classes are
1. Templates that are used to create objects
2. Define object data types and methods.

A class can also be defined as a blueprint from which you can create an individual -?

Object

Do classes consume any space?

No

OOP vs. POP
Which make development and maintenance easier, as well as provides data hiding ?

OOPs

OOP vs. POP
What does POP stand for?

Procedure Oriented Programming

OOP vs. POP
What does OOP stand for?

Object-oriented programming

OOP vs. POP
Which is it not easy to manage if code grows as project size increases, and global data can be accessed from anywhere?

POP

What is a block of codes similar to the method?

A constructor

When is a constructor called?

When an instance of the object is created, and memory is allocated for the object.

"A special type of method which is used to initialize the object" is what?

A constructor

What is missing from the OOP system in the picture below?

Polymorphism

Front image: 

What is missing from the OOP system in the picture below?

Object

Front image: 

What makes sure that constructors for all of an object's sub-objects are called when an object is created?

The compiler

Why is it called a constructor?

because it constructs the values at the time of object creation

What if your class doesn't have any constructors?

Java compiler creates a default constructor

What are the three rules defined for the constructor?

1. Constructor name must be the same as it's class name
2. A constructor must have no explicit return type
3. A java constructor cannot be abstract, static, final, and synchronized

What are the two types of constructors?

Default constructor
Parameterized constructor

Parameterized vs. Default
Which constructor has a specific number of parameters?

Parameterized constructor

Parameterized vs. Default
Which constructor is a no-args constructor that the Java compiler inserts on your behalf?

Default constructor

In Java, a constructor is just like a - but without return type

Method

Can a constructor be overloaded?

Yes

What is constructor overloading?

A technique of having more than one constructor with different parameter lists. They are arranged in a way that each constructor performs a different task. They are differentiated by the compiler by the number of parameters in the list and their types.

Constructor vs Method
Used to initialize the state of an object.

Constructor

Constructor vs Method
Used to expose the behavior of an object.

Method

Constructor vs Method
Must have a return type

Method

Constructor vs Method
Must not have a return type

Constructor

Constructor vs Method
Invoked implicitly

Constructor

Constructor vs Method
Invoked explicitly

Method

Constructor vs Method
Not provided by the compiler in any case

Method

Constructor vs Method
Provides a default if you don't have any in a class

Constructor

Constructor vs Method
Name must be the same as the class name

Constructor

Constructor vs Method
Name may or may not be the same as class name

Method

Subjects: