Best Fare Calculator Challenge Project (Java)

Hello! This is my solution:

Any feedback would be appreciated!

Thanks all!

This was a my first challenge from Codecademy and ■■■■ lot of fun! Hope you all enjoyed it too!

1 Like

Not too bad - had a bit of trouble but managed to get it working. Could definitely refactor using more arrays to clean it up even more. Otherwise, I had a lot of fun with this project.

My code works at telling me the correct price per ride but I cannot figure out why it doesn’t say the correct name of the ride because the index of the name and the price are set at the same time. It just always sets the `smallestIndex` value to 1 no matter what.

Here’s my project! This was crazy hard and frustrating but after working on it for many many hours I finally figured everything out and now I think I have much better understanding of how to properly use methods. I added the reduced prices for seniors and people with disabilities and also the current transit prices for Chicago.

Here is my solution.
I included logic to determine the best fare based on the age, disability status and location. I also included comments to aid comprehension.

Overall, it was a good try-out.
I must confess i had to code this first in python just to get my logic together.

I’m open to feedback.

https://gist.github.com/70d8b74c98e994dde2089e84f9879299

Hello,

This is my solution with the calculator for the persons with disabilities and older than 65.

It’s kinda long…

My solution code: https://gist.github.com/b6e6646dd25049920585c00631476d4f
I enjoyed while coding.
In my code i also added reduced price for older people.
Hope you like it.
Good luck.

Hi!
This is my project - have a look!

Here is my soultion took 5 and a half hours of trouble shooting to get it to be correct! Very proud of my work I know I need to go back and comment it up will do that shortly!

Here is my solution: https://gist.github.com/4ee3ce86632c13821f3b101f8e198f39 it took me 2 hours.