![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
We need to use java program
![We want to compute a taxi travel price. Write a program that asks the user to enter:
The travel distance (in km)
The fuel liter price (in LBP)
The number of passengers.
The program must compute and display (the integer part only) the total travel price and the price per
passenger using the following formulas:
Fuel cost = fuel liter price x travel distance/ 7.5
Total travel price
Price per passenger = total travel price / number of passengers.
|(Fuel cost + 1000 x travel distance) x 1.5
Sample Run 1:
Enter the travel distance and the number of passengers: 75 3
Enter the fuel price per liter: 23750
The total travel price is 468750 LBP
The price per passenger is 156250 LBP
Sample Run 2:
Enter the travel distance and the number of passengers: 25 4
The total travel price is 142500 BP
The price per passenger
Page
12
75°E](https://content.bartleby.com/qna-images/question/58c1ce97-a81e-4121-9348-bb870567773f/ebb3fc40-1367-4e4f-bd2f-652488e63524/y3iz2y_thumbnail.jpeg)
Transcribed Image Text:We want to compute a taxi travel price. Write a program that asks the user to enter:
The travel distance (in km)
The fuel liter price (in LBP)
The number of passengers.
The program must compute and display (the integer part only) the total travel price and the price per
passenger using the following formulas:
Fuel cost = fuel liter price x travel distance/ 7.5
Total travel price
Price per passenger = total travel price / number of passengers.
|(Fuel cost + 1000 x travel distance) x 1.5
Sample Run 1:
Enter the travel distance and the number of passengers: 75 3
Enter the fuel price per liter: 23750
The total travel price is 468750 LBP
The price per passenger is 156250 LBP
Sample Run 2:
Enter the travel distance and the number of passengers: 25 4
The total travel price is 142500 BP
The price per passenger
Page
12
75°E
Expert Solution
![Check Mark](/static/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 3 steps with 1 images
![Blurred answer](/static/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Being a programmer, Python is of particular interest to me.arrow_forwardFor what purpose does it serve to have a programmer who is fluent in many programming languages also be able to quickly pick up others?arrow_forwardWhen might you use a weakly-typed language to write software over a strongly-typed language?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
![Text book image](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education