"สวัสดี อามีโก้! วันนี้ฉันจะไปช่วยคุณทำงาน แต่ฉันเหนื่อยเกินไป และเย็นนี้ฉันยังมีสิ่งที่ต้องทำอีกมาก ดื่มเบียร์และเล่นโปกเกอร์กับเพื่อน ๆ โชคดีนะเพื่อน จัดการกับงานเหล่านี้"
3
งาน
Java Core, ระดับ, บทเรียน
Let's hire a translator
In this task, we'll create a descendant of a generic translator (Translator), who will be a Russian language expert (RussianTranslator). But she won't translate anything in this task. She'll simply state which foreign language she works with.
3
งาน
Java Core, ระดับ, บทเรียน
Code doesn't fix itself
Such a small program shouldn't have had any room for bugs... but alas, this isn't the case! Real programmers can squeeze bugs into any amount of code! But more importantly, the best developers can remove bugs with skill. Fix the code so that the program runs and displays: "I translate from Russian".
3
งาน
Java Core, ระดับ, บทเรียน
A fox is an animal
Do you have any doubt that a fox (unless we are talking about a foxy lady) is an animal, and will remain so for life? If not, then the Animal interface would be perfect for this class. So let's implement it by making a couple of edits to the class itself.
3
งาน
Java Core, ระดับ, บทเรียน
A big fox is still a fox
A big fox is a specific type of fox, while a "ordinary" fox is an animal. Here is a brief outline of what you are going to do in this task. Create an Animal interface, a Fox class (with getName as the only implemented method), and a child of the Fox class (BigFox).