Page 1 of 1

Java using BlueJ

Posted: Fri May 20, 2022 12:01 pm
by answerhappygod
Java using BlueJ
Java Using Bluej 1
Java Using Bluej 1 (46.1 KiB) Viewed 57 times
Java Using Bluej 2
Java Using Bluej 2 (63.03 KiB) Viewed 57 times
Create a project Zoo in BlueJ. The project has Animal, Mammal, Reptile, Dog classes Animal is the super class of Mammal and Reptile. Dog is a subclass of both Mammal and Animal class a) Show the relationship between above mentioned classes and write the necessary class definitions (fields and methods). All the fields and methods should be declared .as protected b) Implement the concept of method overriding in the Zoo project. Use keyword super .to call the base constructor in each subclass

Create a project WildLife in BlueJ. The project has Mammal, Reptile, Crocodile, Rabbit and Fox classes. .Rabbit and Fox inherit from Mammal. Mammal and Reptile inherit from an abstract class Animal .a) Show the relationship between above mentioned classes and write the necessary class definitions b) Class Animal should have both abstract and non-abstract methods. The Animal class have may run(), eat(), die() as abstract methods. Reptile class does not provide implementation of Animal's abstract methods, thus has to be declared as abstract