Create a program that implements a music playlist using structure and files. The program must continue to run until the user picks exit

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter4: The Selection Structure
Section: Chapter Questions
Problem 17RQ
icon
Related questions
Question

Create a program that implements a music playlist using structure and files. The program must continue to run until the user picks exit.

Functionalities:

1. Create two structures. One for the playlist with the details: name, song count, array of songs (size 10) and one for the song with the details: title, artist, album.

2. The program must load the data each time it is ran and must save the data each time the user picks exit.

(a) Save Data

- You must check whether there is a data to be saved. If there are none, simply print a prompt saying so. Also, save count as 0, so that you will be able to keep track if the file is empty.

- The format of the saved data must follow this: *refer to the photo below*

(b) Load Data

- You must check whether the file exists. If the file exists, check if the count is 0. If the count is not 0, read each of the data in the file and save it in the array of structures.

3. Create a menu that shows:

(a) Add Playlist

- The user can put up to 10 playlists in the system. Make sure to check if the system is not yet full.

- If the system is not yet full, ask for the details of the playlist, and initialize the song count to 0. Remember to check that the name of the playlist is unique. If the name already exists, it musn’t be added to the system.

- If the system is full, simply say that it is.

(b) Add Song to Playlist

- Make sure to check if there a playlist to add to. Ask which playlist to add the song to. If the playlist exists and it doesn’t have 10 songs yet, ask for the details of the song. Else, print the appropriate prompts.

(c) Remove Song from Playlist

- Make sure to check if there is a playlist to remove from. Ask which playlist to remove songs from. If the playlist exists, and it isn’t empty, ask which song to remove. If found, remove the song. Else, print the appropriate prompts.

(d) View a Playlist

- Make sure to check if there is a playlist to print. Ask which playlist to print. If the playlist exists, print all the details about it along with the songs. Else, print the appropriate prompts.

(e) View all Data

- This simply prints all of the available data in the system. Both the playlists and songs. Make sure to check if there is data to print.

(f) Exit

- When the user picks this, the program terminates.

4. Each choices except for the exit must be implemented inside a function. You also need to put save() and load() inside a function.

5. Do not forget to put documentation in your code.

 

Total Count of the Playlist
Name of Playlist 1
Number of Songs in Playlist 1
Title of Song 1
Artist of Song 1
Album of Song 1
Title of Song 1
Artist of Song 1
Album of Song 1
Name of Playlist 2
Number of Songs in Playlist 2
2
Taylor Swift
2
Sparks Fly
Taylor Swift
Speak Now
Invisible String
Taylor Swift
folklore
Favorites
0
Transcribed Image Text:Total Count of the Playlist Name of Playlist 1 Number of Songs in Playlist 1 Title of Song 1 Artist of Song 1 Album of Song 1 Title of Song 1 Artist of Song 1 Album of Song 1 Name of Playlist 2 Number of Songs in Playlist 2 2 Taylor Swift 2 Sparks Fly Taylor Swift Speak Now Invisible String Taylor Swift folklore Favorites 0
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L