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

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem we will write a Java program that reads data from a file songsdat calculates the total running time of the songs in both minutes and seconds and determines the remaining time on ... View full answer

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!