Write a program in java that calculates taxi fare at a rate of $1.5 per mile. Your program should interact with the user in this manner:

Taxi Fare Calculator

Enter the distance travelled in miles: 20.2

Your fare is $30.3

Note: You have to use Scanner class to let the user enter the input from the keyboard

Show your work so far (read the Community Rules at https://www.daniweb.com/welcome/rules )

Also if I were to write this, I might not use the scanner class. The specs for apps I've written never demand that specific classes be used. That's up to the author or system designer. Is this homework?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.