"안녕, 아미고! 넌 좋은 친구야! 교수님이 10개의 과제를 내놓으라고 하셨지만, 나는 너에게 2개만 줄게. 숙취로 생각할 수 있는 최대치야. 네가 주최한 파티를 놓쳤다니 아쉬워. 어제 영광입니다. 좋은 시간이었습니다."
4
과제
Java Core, 레벨 4, 레슨 2
잠금
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
과제
Java Core, 레벨 4, 레슨 2
잠금
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.