Calculates the best fare based on number of days and number of rides. Inspired by CodeCademy; written by Colin McAllister on April 30, 2020.
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 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.