Question
JAVA Programming Question WRITE IN JAVA You are burning some music CDs for a party. You've arranged a list of songs in the order in
JAVA Programming Question
WRITE IN JAVA
You are burning some music CDs for a party. You've arranged a list of songs in the order in which you want to play them. However, you would like to maximize your use of space on the CD, which holds 80 minutes of music. So, you want to figure out the total time for a group of songs and see how well they fit. Write and design a java program to help you do this. The data are on the file songs.dat. The time is entered as seconds. For example, if a song takes 6 minutes and 30 seconds to play, the data entered in the data file for that songs would be 390. After all the data has been read, the application should print a message indicating the time remaining on the CD. The output should be in the form of a table with columns and headings written on a file.
Song Number Song Time Total Time
Minutes Seconds Minutes Seconds
__________________________________________
1 5 10 5 10
2 7 42 12 52
5 4 19 17 11
3 4 33 21 44
4 10 27 32 11
5 8 55 41 6
There are 38 minutes and 54 seconds of space left on the 80 minute CD
** Use loop: for (int i=1; 1<=6, i++)
intTmin = 0;
intTmin = Tmin +min; etcetera
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started