You are on page 1of 1

IT1908

Hands-on Activity
Animal Sounds
Objective:

At the end of the activity, the students should be able to:


▪ Extend an abstract class.

Software Requirements:
▪ Latest version of NetBeans IDE
▪ Java Development Kit (JDK) 8

Procedure:
1. Create a public class named RunAnimal. This class shall contain the main method.
2. Add four (4) Java classes without modifiers named Animal (abstract), Bird, Cat, and Dog.
Animal should be the parent class of the other three (3) classes.
3. For the Animal class, declare these three (3) abstract methods: eat(), sleep(), and makeSound().
4. Use only println() for the Bird, Cat, and Dog classes. Create appropriate statements based on
the animal. See sample output below.
5. For the RunAnimal class, use nextLine() and equalsIgnoreCase() to produce an output similar
to the provided sample output.

Sample Output:

GRADING RUBRIC (100 points):

Criterion Description Max Points


Correctness The code produces the expected result. 40
Logic The code meets the specifications of the problem. 40
Efficiency The code is concise without sacrificing correctness and logic. 10
Syntax The code adheres to the rules of the programming language. 10

07 Hands-on Activity 1 *Property of STI


Page 1 of 1

You might also like