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!
- Host: GitHub
- URL: https://github.com/nivindulakshitha/animal-kingdom
- Owner: nivindulakshitha
- License: cc0-1.0
- Created: 2024-03-08T14:50:09.000Z (over 1 year ago)
- Default Branch: Master
- Last Pushed: 2024-03-08T14:51:39.000Z (over 1 year ago)
- Last Synced: 2025-01-01T18:26:35.831Z (6 months ago)
- Topics: java
- Language: Java
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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!
