Code Monkey home page Code Monkey logo

londontubestatisticsarrays.java's Introduction

London Tube Statistics

Example of Java Arrays

The Tube has been an integral part of London's history since 1863 and carry’s 1.34 billion passengers a year. There are 270 stations on the 11 line network, with Waterloo being the busiest station carrying 95.1 million passengers per year. The following tabular data shows the number of passengers who entered 20 stations on a typical day on the network in 2017. The table shows passenger numbers for January – June (inclusive) and July – December (inclusive). The table show entries for each of the 20 stations on a weekday, as well as Saturdays and Sundays. You must write a Java application to do the following:

  1. Represent the passenger information using a suitable data structure(s). You can generate random values for the number of entries for each station. The values you generate must be in the following ranges:  A weekday (in the range 50000 to 140000)  A Saturday (in the range 30000 to 80000)  A Sunday (in the range 5000 to 15000)
  2. Display the passenger information neatly (see the output from my solution below).
  3. Calculate and display which station was the busiest across the entire year (displaying the station name and the total number of passengers).
  4. Calculate and display the percentage increase/decrease of passenger entries for each station. This percentage value must be based on the difference in passenger entries between both halves of the year. This value must be formatted to a maximum of two decimal places. A sample run of my solution yielded the following output. You must have at least four methods (along with main) in your solution.
  • Method one – to initialise the passenger information.
  • Method two – to display the passenger information.
  • Method three – to determine the busiest station.
  • Method four – to calculate the percentage increase\decrease for each station.

londontubestatisticsarrays.java's People

Contributors

mrzakiakkari avatar

Watchers

 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.