Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write java program Suppose you are given a text file named Cars , in which each line of the file contains the model, year and

Write java program
Suppose you are given a text file named Cars, in which each line of the file contains the model, year and price of a car, separated by ;. Your program should read the Cars file and save the data into another text file named Result, such that the car price of year 2019 should be increased by 5%. Also, output the number of cars with updated prices, as shown in the example below.
Cars.txt:
Patrol:2019:20000.000
Corrolla:2018:6000,000 Yaris; 2019;7500.000
Mazda6; 2017: 8000.000
Result.txt
Patrol;2019;21000.000
Corrolla;2018;6000,000
Yaris;2019;7875,000
Mazda6;2017;8000.000
Number of cars with updated
prices =2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

Know why employees turn to unions

Answered: 1 week ago

Question

LO1 Understand risk management and identify its components.

Answered: 1 week ago