An open API service indexing awesome lists of open source software.

https://github.com/nivindulakshitha/animal-kingdom

Code and learn with a virtual zoo of Java animal classes!
https://github.com/nivindulakshitha/animal-kingdom

java

Last synced: 4 months ago
JSON representation

Code and learn with a virtual zoo of Java animal classes!

Awesome Lists containing this project

README

        

# Animal Kingdom 🐾

Discover the Fascinating World of Animals!

## Overview

Explore the diverse world of animals through Java programs showcasing different animal types and their behaviors.

## Classes

### 🐱 Cat
- Description: Represents a cat with name, age, breed, and hair type.
- Functionality: Produces a meowing sound.

### 🐶 Dog
- Description: Represents a dog with name, age, and breed.
- Functionality: Produces a barking sound.

### 🦴 Animal
- Description: Represents a generic animal with name, age, and breed.
- Functionality: Produces a generic animal sound.

## Class Reviews

### `Animal.java`
- Represents a generic animal with common properties like name, age, and breed.
- Provides a method `makeSound()` to produce a generic animal sound.

### `Cat.java`
- Extends `Animal` class.
- Represents a cat with additional property `hairType`.
- Overrides the `makeSound()` method to produce a meowing sound.

### `Dog.java`
- Extends `Animal` class.
- Represents a dog.
- Overrides the `makeSound()` method to produce a barking sound.

### `Test.java`
- Main class for testing different animal behaviors.
- Creates instances of `Animal`, `Dog`, and `Cat` classes and invokes the `makeSound()` method to demonstrate different sounds.

Unleash the magic of the animal kingdom with these Java programs!

![Java](https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=java&logoColor=white)