Giter Site home page Giter Site logo

java-transportation's Introduction

Java Transportation

Introduction

This project is used to introduce in Java

  • Interfaces
  • Abstract Classes
  • Lambda Expressions

Layout

The main class with the main method contains most of the work. The work is meant to highlight what can be done with interfaces, abstract classes and lambda expressions.

Diagram of transport

Results

The output of this application is:

*** Working with Interfaces ***
Seabiscuit 7



*** From Abstract Class ***
Secretariat 30
Eclipse -9

*** This List ***
[HorseFromVehicle{name='Secretariat', fuel=30}, HorseFromVehicle{name='Trigger', fuel=20}, HorseFromVehicle{name='Seattle Slew', fuel=20}, HorseFromVehicle{name='American Pharoah', fuel=20}, HorseFromVehicle{name='Eclipse', fuel=-9}, Auto{year=2000, fuel=-5}, Auto{year=1998, fuel=10}, Auto{year=2003, fuel=5}]



*** Working with Lambda Expressions ***

*** This List Sorted ***
Accord
American Pharoah
Eclipse
EuroVan
Seattle Slew
Secretariat
Trigger
Tundra

*** This List Negative Fuel ***
Eclipse -9
EuroVan -5

*** Horse with positive Fuel Sorted by Name ***
HorseFromVehicle{name='American Pharoah', fuel=20}
HorseFromVehicle{name='Seattle Slew', fuel=20}
HorseFromVehicle{name='Secretariat', fuel=30}
HorseFromVehicle{name='Trigger', fuel=20}

Do note that while an Egyptian pharaoh is spelled with a aoh, the horse American Pharoah is spelled with a oah.

java-transportation's People

Contributors

jrmmba8314 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  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.