GithubHelp home page GithubHelp logo

metro-system-wiley-233-team-7's Introduction

METRO SYSTEM APP

Metro System Console Application

TEAM MEMBERS

  • Sandesh Tiwari S
  • Krishna Tej
  • Harshit Shukla
  • Sri Hari N U
  • Ayesha Rehman
  • Atharva Deshmukh

PROBLEM DESCRIPTION

Design and develop an application for central metro system. The application needs to provide the swipe in and swipe out functionality.

Swipe in refers to boarding the station. Swipe out refers to coming out of the station. Every metro station has both swipe in and out facilities. There will be a metro card issued to every user with a minimum balance of Rs 100.

The metro line consists of 5 linear stations as mentioned below.

INSTRUCTIONS:

  1. When a new user is created, accept user’s basic details along with the card balance to issue the card to the user.

  2. For Swipe in functionality, the application should

  • Accept the user’s input as source station.
  • The station can be from the above list only. Create a custom exception (with a meaningful message to the user) to handle invalid station inputs.
  • Validate the minimum required balance in the card. The user should have minimum balance of Rs 20 in the card. If the balance is not there, throw custom exception with appropriate message to user and do not allow to swipe in. -On successful swipe in, which means if the minimum balance is present then print the message as “You have successfully swiped in at the station” + <Source Station Name>.
  1. For Swipe out functionality, the application should -Accept the user’s input for destination station. -The station can be from the above list only. Create a custom exception (with a meaningful message to the user) to handle invalid station inputs. -Calculate the total fare based on source and destination stations and deduct the fare from the card balance. The fare calculation is based on the below rules. -Fare between any 2 adjacent stations is Rs 5. Example – Fare between L1 and L2 is Rs 5 and fare between L2 and L3 is Rs 5. -After deducting balance, the message needs to be printed “You have successfully swiped out with card balance as” + <actual card balance>.

  2. Show the output on the console.

  3. Handle appropriate exceptions with appropriate message whenever required.

  4. The design should be flexible enough so that in future, more stations and different fare calculation methods can be added.

metro-system-wiley-233-team-7's People

Contributors

sandeshtiwari16 avatar rayesha32217 avatar harshit517 avatar krishnatejnk avatar sriharinu avatar

Stargazers

 avatar  avatar

Watchers

 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.