Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

OVERVIEW You will read data from a text file using a control loop, convert the numbers to the proper format, and then send the numbers

image text in transcribedimage text in transcribedimage text in transcribed
OVERVIEW You will read data from a text file using a control loop, convert the numbers to the proper format, and then send the numbers to the screen AND to an output file. INSTRUCTIONS For this assignment, imagine you are burning some music CDs for a party. You have arranged a list of songs in the order you want to play them. However, you would like to maximize your use of space on the CD, which holds 80 minutes of music. To do so, you want to figure out the total time for a group of songs and see how well they fit. Write and design a C+ + program to help you accomplish this task. The number of seconds for each song is already provided for you in the table below: 310 462 627 273 300 535 259 625 736 122 215 Save this table in a separate data file and name it "songs.txt" Save it in the same folder as your program file. The time is entered as seconds. For example, if a song takes 7 minutes and 42 seconds to play, the data entered for that song would be 462. Create a program that 1. Reads the data from the song txt file 2. Calculates the minutes & seconds for each song. 3. Prints the list of songs, the amount of time it consumes, the total amount of time on the CD, and the amount of time remaining available on the CD. 4. Prints the output in the form of a table with columns and headings written on a file. For example:Song Song Time Total Time Number Minutes Seconds Minutes Seconds 10 5 10 42 12 52 4 19 17 11 NOAWINE 4 33 21 44 10 27 32 11 55 41 6 46 6 There are 33 minutes and 54 seconds of space left on the 80-minute CD. Page 1 of 2 CSIS 111 Note: The output converts the input from seconds to minutes and seconds. Use meaningful variable names, proper indentation, and appropriate comments. Thoroughly test the program using your own data sets. 5. Make the program aesthetically appealing for the user and for a fellow programmer Use meaningful variable names, proper indentation, and appropriate comments. Thoroughly test the program using the data set found in songs.txt file provided for you.//Include statements #include #include GUSWNP using namespace std; / /Global declarations: Constants and type definitions only -- no variables g / /Function prototypes 10 11 Dint main( ) 12 13 //In cout statement below substitute your name 14 cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions

Question

International marketing research

Answered: 1 week ago