Assume you are the owner of Tower Records, which sells music CDs ml albums, and
ID: 3684073 • Letter: A
Question
Assume you are the owner of Tower Records, which sells music CDs ml albums, and you decide lo hold a sale to try to reduce your inventory of old records Write a Java program to read from your inventory text file (here is an example albums.txt file) 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 die coal lo 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 $0 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 The title of the album The artist group name The year of release The price of the album Finally: Upload Albums java to the dropboxExplanation / Answer
albumscds.txt
Rock Steady
computer
2002
16.26
Revolution
Mr.jhon
1966
15.56
Difficult to face
Janson hall
2003
20.50
History repeates
ullman
1997
18.43
public class albumcds
{
public static void main(String[] args)
{
try
{
catch(FileNotFoundException e)
{
while(inputStream.hasNextLine())
{
if(date <= 2010-1 && date > 2010-5)
{
else if(date <= 2010-5 && date > 2010-10)
{
else
{
import java.util.Scanner;Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.