Description: Assume you are the owner of Tower Records, which sells music CDs an
ID: 3684043 • Letter: D
Question
Description:
Assume you are the owner of Tower Records, which sells music CDs and albums, and you decide to hold a sale to try to reduce your inventory of old records.
Objective:
Write a Java program to read from your inventory text file (here is an example albums.txt file [https://cse.sc.edu/~pade/csce145/assign/Lab20/albums.txt]) which contains information about albums and CDs, including their cost.
Update the cost of the album according to the following rules:
----If an album is between one and five years old, change the cost to show a discount of 5%.
----If an album is between 5 and 10 years old, give a discount of 10%.
----If it is more than 10 years old, give a discount of 50%.
The album information with the new pricing should be written to the console
Each record is represented by four lines of text in the files:
1. The title of the album
2. The artist/group name
3. The year of release
4. The price of the album
Explanation / Answer
Hi below i have written the code for your reference,
01 import java.util.Scanner;