Valentine, Holiday, and Birthday inherit from the class Card. In order for the following code to be correct, what type must the reference variable card be? card = new Valentine( "A", 14 ) ; card.greeting(); card = new Holiday( "B" ) ; card.greeting(); card = new Birthday( "C", 12 ) ; card.greeting();
1 answer:
Answer:The variable card must be of type Card
Explanation:The reference has to be of the same type of the class. In this case, there are many diferent classes and the common one is Card, as all inherit from it.
You might be interested in
12345678910 it is the answer i think
Answer:
This language is D A N ISH
Explanation:
For some reason it wouldn't let me type the word D A N ISH so I had to space it out sorry for the inconvenience.
É uma comparação
--------------------------------------------------------------
Please,,,,,,,,,,, thanks.......
disa [49]
Answer:
Explanation:
1. shabby
2. burden
3. attractive
4. qualified
5. response
6. consent
1. urgent
2. dependable
3. previous
4. thaw
5. indicated
6. vanity
It was a stone tool used to make tools