Question: Write a JavaFX program that is a simple calculator that calculates an estimated fare for a Lyft ride in the Philadelphia area. The program should
Write a JavaFX program that is a simple calculator that calculates an estimated fare for a Lyft ride in the Philadelphia area. The program should take two inputs, the estimated number of miles plus the estimated time required to complete the trip. The current Lyft fare schedule for Philadelphia is here: https://www.lyft.com/cities/philadelphia-pa The calculator should look something like below within a window: *** Logo Graphic *** Miles: ___________ Minutes: __________ Estimated Fare: _______ Calculate where Calculate is a button and Estimated Fare is a text field that is filled in after Calculate is pushed. Pretty much like how the calculator example works in the book. To calculate the fare, you must start with the base fare, add the service fee, then multiple the miles by the cost per mile and add in the cost per minute times the number of minutes. When you come up with a final number, make sure its not below the minimum or above the maximum and adjust. You don't have to worry about the Philly or PA surcharge unless you want to add an option checkbox and add a little extra shine to it! :) Well thats pretty easy. So to mix it up a little, at the top of the window above the entries people type in, I want you to display the Lyft logo. Ah but the ebook hasnt told you how to do that. Awww. thats a shame. Youre stuck now and your mean instructor isnt going to tell you how to do it. What are you going to do? Hopefully I dont have to spell it out for you. No in all seriousness. The most important skill you need to learn anymore is HOW TO USE A SEARCH ENGINE. So throwing a graphic image into a scene is not that difficult. Just Google something like JavaFX include graphic scene or something like that and find a small example of how to do it and youre golden. Also, I chose this as an example to make it a little more interesting as a real-life problem solving example. I have no ties to Lyft. If you happen to drive for Uber, feel free to adapt it to use Uber. Thats fine! :-) However, most ride sharing drivers Ive met drive for them both anyway! :)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
