Skip to content

Calculates the best fare depending on how many days the user will be traveling and how many rides the user will take.

Notifications You must be signed in to change notification settings

offsetkeyz/NYC-Fare-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NYC-Fare-Calculator

Calculates the best fare based on number of days and number of rides. Inspired by CodeCademy; written by Colin McAllister on April 30, 2020.

Description

This program determines the best fare, whether it be a daily pass, a 7-day unlimited pass, or a 30-day unlimited pass. It calculates the cost per ride for each of the options and makes a suggestion to the user based on how many days they will be riding, and how many rides they will be taking. This project was inspired by the CodeCademy project, but coded completely from scratch.

The Program

The program begins by using a JOptionPane to ask the user "How many days will you be riding?" Then, it asks the user "How many rides?" Using the methods, the program then prints a suggestion (using another JOptionPane) as to which fare to purchase and how much it will cost per ride.

About

Calculates the best fare depending on how many days the user will be traveling and how many rides the user will take.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages