Toggle navigation
Create account
Sign in
Create flashcards
Courses
Week 5 Hierarchy, Inheritance, Superclasses and Su...
Week 5 Hierarchy, Inheritance, Superclasses and Subclasses
0
9 flashcards
up804653
start learning
download mp3
×
Perfect for auditory learners
–
Turn your words in an audiocourse and learn:
while riding on the bus or in a car
walking the dog
waiting in line
before bedtime
This function is only available for premium users.
activate a premium account
sample recording
print
×
Perfect outside
–
Print your words:
as a handy list
as flashcards to be cut out
This function is only available for premium users.
activate a premium account
an example of a printout
play
test yourself
Question
Answer
Inheritance goes from generalised to specialised. t/f?
start learning
True
Describe inheritance using the is-a relationship concept
start learning
means that one class is a subclass of another. For example, a dog is a mammal, in other words a Dog class is a subclass of Mammals class.
descri aggregation using the has-a relationship concept
start learning
a dog has a leg (usually more than one). If in class Dog we declare a member variable of type Leg (another class) we don’t have inheritance, we have a has-a relationship (aggregation).
can we combine is-a and has-a relationships?
start learning
yes eg:, a dog is-a mammal and it has-a leg/s
What does a subclass constructor look like
start learning
public class Dog extends Mammals {private Leg [] legs; /* Leg is a class and legs is an array of objects of this type */ ...}
Does a subclass inherit all members of its parent class and predecesorclasses?
start learning
No, private variables and methods are not inherited.
what is the word super used for?
start learning
to refer hidden variables and overridden methods of the superclass
When can a subclass directly access super class members
start learning
if they are declared publoc protected or default and are in the same package
does a subclass inherit data fields automatically?
start learning
yes
Create flashcards
See related flashcards:
Week2 objects and parameters
Week 6 Inheritance Vector, ArrayList and LinkedList
Week7 Graphical User Interface (GUI). Abstract Windowing Toolkit (AWT) and Swing
Week 8 Inheritance. Abstract classes. Polymorphism
Week 9 Event driven programing
You must sign in to write a comment
×
Main
Progress bar
Clock
Enforce good response
Content
Text
Example text
images
Recordings
Example recordings
recordings native
Grammar highlighting
Retyping options
ignore:
spaces
diacritics
brackets
punctuation
capital letters
no article
combine shortcuts
order
report an error
Thank you for reporting :)
1
2
3
4
check
next
I'm right ↑
(
Tip:
Pressing
enter
considers the answer to be
wrong
Tip2:
in order to see the question again, click on the notepad )
revise
I knew it
show answer
check
next
I'm right ↑
(
Tip:
Pressing
enter
considers the answer to be
wrong
Tip2:
in order to see the question again, click on the notepad )
Well done, you're doing fine:)
The creator of these flashcards is Up804653.
Click here to create your own download :)
If you prefer ready, try out our professional courses.
Advanced English: C1&C2 level
try it for free
Academic Word List
try it for free
Repeat all
Repeat difficult flashcards
End of round
1
Summary
round
I knew it
revise
1
(
)
(
)
Next round
revise what you didn't know
`
1
2
3
4
5
6
7
8
9
0
-
=
Nederlands, Vlaams
English
American English
Français
Deutsch
italiano
Norsk
język polski
português
русский язык
español
Svenska
українська мова
gjuha shqipe
العربية
euskara
беларуская мова
български език
català, valencià
中文, 汉语, 漢語
hrvatski jezik
český jazyk
dansk
Esperanto
eesti keel
føroyskt
suomen kieli
galego
ქართული
ελληνικά
עברית
हिन्दी, हिंदी
magyar
Íslenska
Bahasa Indonesia
日本語, にほんご
ಕನ್ನಡ
Қазақша
한국어, 韓國語, 조선어, 朝鮮語
latine
latviešu valoda
lietuvių kalba
Lëtzebuergesch
македонски јазик
bahasa Melayu, بهاس ملايو
Malti
Papiamento
فارسی
Português brasileiro
limba română
rumantsch grischun
Gàidhlig
српски језик
slovenský jazyk
slovenski jezik
ไทย
Xitsonga
Setswana
Türkçe
اردو
Tiếng Việt
isiXhosa
ייִדיש
isiZulu
q
w
e
r
t
y
u
i
o
p
[
]
\
a
s
d
f
g
h
j
k
l
;
'
z
x
c
v
b
n
m
,
.
/
Ctrl + Alt
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
×
Select the correct answer
create a new test
×
Pair all the words as quickly as possible!
0
steps
New game:
4x3
5x4
6x5
7x6
×
Log in
Log in
Sign in
Login or Email
Password
Sign in
Forgot your password?
Don't have an account?
Log in
Log in
Create account
Get Started with this Free Course!
No Cost. No Obligation. No Spam.
Your email address
Create account
Already have an account?
I accept the
terms
and
privacy policy