Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

OOP - L1

Encapsulation, Inheritance, Polymorphism

QuestionAnswer
What is OOP? Object Oriented Programming
The name of the class whose object you want to create. ClassName
A reference variable that will point to the object. objectName
Keyword used to allocate memory for the object new
- Calls the constructor of the class (parameters are optional depending on the constructor). ClassName (parameters)
is the principle of pushing data (fields) and methods that operate on that data into a single unit (class), while restricting direct access to the data by using access modifiers Encapsulation
Wrapping variables (data) and methods (code) together in one class Encapsulation
Protects data integrity by controlling how values are set Encapsulation
is an Object-Oriented Programming (OOP) concept where one class (child/subclass) acquires the properties and behaviors of another class (parent/superclass) using the extends keyword. Inheritance
The class whose features are inherited. Superclass (Parent/Base Class):
The class that inherits from the superclass. Subclass (Child/Derived Class)
extends is used to establish inheritance. Keyword:
Subclass can reuse fields and methods of the parent class. Reusability
Subclass can add new fields/methods or override existing ones Customization
Enables writing flexible code where a parent reference can point to child objects. Polymorphism
Types of Inheritance Single Inheritance Multilevel Inheritance Hierarchical Inheritance Hybrid Inheritance
One class inherits from another Single Inheritance
A class inherits from a subclass (chain). Multilevel Inheritance
Multiple classes inherit from one superclass. Hierarchical Inheritance
Combination of different types (not directly supported in Java due to ambiguity, but achievable via interfaces) Hybrid Inheritance
means “many forms” — it allows the same method or object to behave differently depending on the context, typically through method overloading (compile-time polymorphism) and method overriding (runtime polymorphism). Polymorphism
Multiple methods with the same name but different parameter lists. Compile-time polymorphism
A subclass provides a specific implementation of a method already defined in its superclass. Runtime polymorphism
Types of Polymorphism Types of Polymorphism
Achieved by function overloading or operator overloading Compile-time Polymorphism
Why Encapsulation Matters? Security Flexibility Validation Reusability
Created by: user-1782765
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards