- Create Three Different Text Files To Hold The Following Item Id Item Price Expiry Year Use Random Values To Fill T 1 (202.81 KiB) Viewed 29 times
• Create three different text files to hold the following: Item ID, Item Price, Expiry year. Use random values to fill t
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
• Create three different text files to hold the following: Item ID, Item Price, Expiry year. Use random values to fill t
• Create three different text files to hold the following: Item ID, Item Price, Expiry year. Use random values to fill the files. O Write a complete java program to read the text files and store the values in 1D arrays. • Make sure to handle any errors in case the files were not found. Check the validity of the year (it should not be older than 2022). Then calculate the total bill excluding the expired items. • Print a report to show all information. • Submit your answer as a word document, along with the created text files. Example: Text Files: Item Year - Notepad Х ItemID - Notepad Х Format View Help File Edit 2023 2025 2020 2023 ItemPrice - Notepad File Edit Format View Help 10 15 32 21 File Edit Format View Help 202020 201202 213201 220123 100% Windows (CRLF) UTF-8 100% Windows (CRLF) UTF-8 100% Windows (CRLF) UTF-8 • Output: ID Price 202020 10.0 201202 15.0 213201 32.0 220123 21.0 Total= 46 Number of Expired prices= 1 Year 2023 2025 2020 2023 Expired!