Git Product home page Git Product logo

java-iii-animal-kingdom-search's Introduction

Java III - Interfaces and Closures

Animal Kingdom Search Project

A simple search app to practice Java interfaces, abstract classes and Lambda Expressions.

1: Create an abstract class for animals

  • All animals consume food the same way
  • Each animal is assigned a unique number, a name, and year discovered regardless of classification.
  • The methods will return a string saying how that animal implements the action
  • Animals can move, breath, reproduce

2: Create classes for mammals, birds, fish

  • Mammals: move - walk, breath - lungs, reproduce - live births
  • Birds: move - fly, breath - lungs, reproduce - eggs
  • Fish: move - swim, breath - gills, reproduce - eggs

3: Create a collection for the animals using the following data

  • Mammals:
    • Name: Panda Year Named: 1869
    • Name: Zebra Year Named: 1778
    • Name: Koala Year Named: 1816
    • Name: Sloth Year Named: 1804
    • Name: Armadillo Year Named: 1758
    • Name: Raccoon Year Named: 1758
    • Name: Bigfoot Year Named: 2021
  • Birds:
    • Name: Pigeon Year Named: 1837
    • Name: Peacock Year Named: 1821
    • Name: Toucan Year Named: 1758
    • Name: Parrot Year Named: 1824
    • Name: Swan Year Named: 1758
  • Fish:
    • Name: Salmon Year Named: 1758
    • Name: Catfish Year Named: 1817
    • Name: Perch Year Named: 1758

4: Search using Lambda Expressions

  • List all the animals in descending order by year named
  • List all the animals alphabetically
  • List all the animals order by how they move
  • List only those animals the breath with lungs
  • List only those animals that breath with lungs and were named in 1758
  • List only those animals that lay eggs and breath with lungs
  • List alphabetically only those animals that were named in 1758

Build from Source

Ensure that you have Git and JDK 11.

Get the Source Code

git clone https://github.com/d-vail/Java-III-Animal-Kingdom-Search.git
cd Java-III-Animal-Kingdom-Search

Build and Run from the Command Line

To compile and build the project use:

./gradlew build

To run the application use:

./gradlew run

Import into IntelliJ IDEA

Ensure JDK 11 is configured properly in the IDE.

  • From Welcome Screen: Import Project -> Navigate to the project directory -> Select build.gradle
  • From the Editor: File -> New -> Project from Existing Sources -> Navigate to the project directory -> Select build.gradle

java-iii-animal-kingdom-search's People

Contributors

d-vail avatar

Watchers

 avatar Megan Williamson avatar

java-iii-animal-kingdom-search's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.