Giter Club home page Giter Club logo

java-streams-with-pokemon's Introduction

Java Streams with Pokemon

Objective

  • Use java streams to analyze Pokemon data

Rationale

Procedural programming is giving way to an increasing reliance on the declarative functional paradigm. This lesson helps familiarize students with Java streams and lambda expressions which are the two most common functional features used in modern Java applications.

Setup

  1. Fork this repo
  2. Clone this repo
  3. Implement the story shown below using the method stubs provided in PokeProcessor.java
  4. Commit
  5. Push!

Instructions

  • Use stream syntax to implement the story below.
  • It's okay to use for loops at first, but you must refactor
  • Submit your work using only higher-order functions

Story

As a Pokemon enthusiast, I want to run various queries against the PokeData So that I can learn enough to create the perfect deck!

#####Acceptance Criteria

  • listPokemon should return a list of names of all pokemon.
  • pokemonWith3Weaknesses should return a list of all pokemon with 3 weaknesses
  • calculateAverageMaxHP should calculate the average MaxHP of all pokemon. Don't worry about this one, the seed JSON data doesn't support this problem
  • listWeaknesses should return a list of all weaknesses.
  • pokemonResistantByAttack should return a list of pokemon resistant to a given attack.
  • numOfPokemonResistantByAttack should return an object with each type of attack and the number of pokemon that are resistant to that attack.
  • typesOfFastAttacks should return a list of all types of fast attacks.
  • specialAttacksPokemon should return a list of Pokemon that have more than three special attacks.
  • heavyPokemon should return the percent of pokemon who have a mass > 50 kg.
  • describePokemonByNumber should return a description of a pokemon when given a number.

Stretch

  • Use only pure functions in your PokeProcessor class.
  • One statement solutions

Resources

java-streams-with-pokemon's People

Contributors

jtklier avatar jeff-lent avatar

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.