e of the JAVA output, Thank you.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question

Please include the JAVA code and a Capture of the JAVA output, Thank you.    

Write a JAVA program that read from user two number of fruits contains fruit name (string), weight in
kilograms (int) and price per kilogram (float). Your program should display the amount of price for each
fruit in the file fruit.txt using the following equation:
(Amount = weight in kilograms * price per kilogram)
Sample Input/output of the program is shown in the example below:
Screen Input Fruit.txt (Input file)
Fruit.txt (Output file)
Enter the first fruit data : Apple 13 0.800
Apple
10.400
Enter the first fruit data : Banana 25 0.650
Banana
16.250
Transcribed Image Text:Write a JAVA program that read from user two number of fruits contains fruit name (string), weight in kilograms (int) and price per kilogram (float). Your program should display the amount of price for each fruit in the file fruit.txt using the following equation: (Amount = weight in kilograms * price per kilogram) Sample Input/output of the program is shown in the example below: Screen Input Fruit.txt (Input file) Fruit.txt (Output file) Enter the first fruit data : Apple 13 0.800 Apple 10.400 Enter the first fruit data : Banana 25 0.650 Banana 16.250
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Multithreading Methods
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning