Flashcards
Quiz Study 1302
Cards in this deck (13)
- 1InheritanceDeriving from a parent class to a child class
- 2AggregationOne thing is apart of another thing
- 3Inheritance 2nd def.A specialized version of another thing
- 4Protected VisibilityLevel of visibility with access inside the class it was defined and any of its child classes
- 5Private VisibilityIs a level of visibility with access only to the class in which its defined.
- 6Public VisibilityVisibility with access everywhere
- 7What keyword denotes Inheritance? and how would you write it?"extends" keyword It is written as "ClassName 'extends' ClassName"
- 8What Type of Relationship is Inheritance?it is "Parent-Child Relationship"
- 9How to write a static method'Public Static Main(String[ ] args)'
- 10How to Call A Static Methodpublic class ShapeMethodTester{
public static void main(String[] args){ ShapeMethods.circleArea(14.2);}
} - 11When would you make a method static? (there are two possible reasons)If a method doesn't modify state of object, or not using any instance variables. Or You want to call method without creating instance of that class.
- 12How to write an aggregation in Java?//Creating HAS-A relationship with Address class
' Address studentAddr; ' - 13What type of relationship is Aggregation?The relationship is a "Has-A" relationship
Information
- Description
- Flashcards on Quiz Study 1302, created by marc30599 . on 02/10/2018.
- Created by
- marc30599 .
- Views
- 0
- Rating