Question: Without any build in methods Assessment 1 (File Input & Output) Write a java program that: 1. Create a file with the name ItemPrice.txt and

Without any build in methods Without any build in methods Assessment 1 (File Input & Output) Write

Assessment 1 (File Input & Output) Write a java program that: 1. Create a file with the name "ItemPrice.txt" and has the following content (the item name, first price and second price) with the same bellow structure: Black Blouse 80 50 Black Skirt 75 75 Light Jeans 50 45 Women Pants 55 30 Women Dress 100 100 2. Read the file ItemPrice.txt" content one by one and chick if the second price is less than the first price so the item is on sale, then write the result in a new file with the name Saleltem.txt". The new file content should have the following structure: Black Blouse OnSale Black Skirt NotOnSale Light Jeans OnSale Women Pants On Sale Women Dress NotOnSale 3. Read an item name from the user and search the file Saleltem.txt, then print if the item is on sale or not. If the item name is not exists in the file, display a message "item name not found

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!