"Hei, Amigo! Du er en god venn! Professoren sa at han skulle komme med 10 oppgaver, men jeg gir deg bare to. Det er det meste jeg kunne tenke meg med bakrus. Det er synd at du gikk glipp av festen som ble holdt. til ære for deg i går. Det var en flott tid."
4
Oppgave
Java Core, nivå, lekse
Låst
Bingo!
A tiger is a bit more than a cat. And a cat is a pet. And in turn, any pet is an animal. And all of them descend from Object. Something is wrong with the inheritance in our program. Correct the 'Object animal = new Pet();' line in the main method so that the program displays "Bingo!"
4
Oppgave
Java Core, nivå, lekse
Låst
Bingo!
A rose by any other name: it's no coincidence that the famous cartoon cat is called Tom. In the language of Shakespeare, a tomcat is a male cat. Obviously, tomcat is also a "regular" cat and can move. Correct the program so that the variable cat references an object that simultaneously implements CanMove, and is a Cat and a Tomcat.
0
Kommentarer
Populær
Ny
Gammel
Du må være pålogget for å legge igjen en kommentar