Save
Busy. Please wait.
or

show password
Forgot Password?

Don't have an account?  Sign up 
or

Username is available taken
show password

why


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.
We do not share your email address with others. It is only used to allow you to reset your password. For details read 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 (0)
Remaining cards (0)
Know (0)
0:00
share
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

Chapter 10

Introduction to Inheritance

TermDefinition
Inheritance A mechanisms in Java and all object-oriented languages that enables one class to acquire all the behaviors and attributes of another class and then to expand on those features
Unified Modeling Language(UML) Programmers and analysts sometimes use a graphical language to describe classes and object-oriented processes; this Unified Modeling Langauge consists of many type of diagrams
1. Class Diagram A visual tool that provides you with an overview of a class. Consists of a rectangle divided into three sections. The top section contains the name of the class. The middle section contains the names and data types of the attributes.
2. Class Diagram The bottom sections contains the methods. Only the method return type, name, and arguments are provided in the diagram
Base Class A class that is used as a basis for inheritance
Derived Class A class that inherits from a base class
Composition The relationship in which a class contains one or more members of another class, when those members would not continue to exist without the object that contains them. Ex: If a Business closes, its Departments do as well
Aggregation The relationship in which a class contains one or more members of another class, when those members would continue to exist without the object that contains them. Ex: If a business or department closed, the employees would continue to exist
Superclass and Subclass or Parent Class and Child Class Other terms for base class and derived class
Keyword extends Used to achieve inheritance in Java. For example, the following class header creates a superclass-subclass relationship between Employee and EmployeeWithTerritory... public class EmployeeWithTerritory extends Employee
Instanceof Operator Used to determine if an object is member of a class. Ex: If northerRep is an EmployeeWithTerritory object, then the value of each of the following expressions is true: northernRep instanceof EmployeeWithTerriory... northernRep instanceof Employee
Upcast Programmers say that instanceof yields true if the operand on the left can be upcast to the operand on the right
Polymorphism Using the same method name to indicate different implementations. This term means "many forms" - many different forms of action take place, even though you use the same word to describe the action
Overriding Parent Class Methods When you create a method in a child class tat has the same name and parameter list as a method in its parent class, you override the method in the parent class. When you use the method name with child object, child's version of method is used
Keyword super Always refers to the superclass of the class in which you use it
Information Hiding The concept of keeping data private
Keyword Protected An intermediate level of security between public and private access. If you create a protected data field or method, it can be used within its own class or in any classes extended from that class, but it cannot be used by "outside" classes
Fragile Classes Classes that directly use fields from parent classes are said to be fragile because they are prone to errors - that is, they are easy to "break"
Methods You Cannot Override The three types of methods that you cannot override in a subclass are... 1. static methods... 2. final methods... 3. Methods within final classes
Virtual Method Calls In Java, all instance method calls are virtual method calls by default - that is, the method used is determined when the program runs because the type of the object used might not be known until the method executes
Inlining Code When a compiler optimizes a program's performance by removing the calls to final methods and replacing them with the expanded code of their definitions at each method call location
Subtype Polymorphism The ability of one method name to work appropriately for different subclasses of a parent class
 

 



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