Write a C++ program that allows a user to play your mixtape, one song at a time, or all at once. The program must contain two classes; one class is to represent a Song (track) and one to represent the Mixtape (playlist). You will then create a playlist/mixtape of songs/tracks in your main function. Songs (or tracks) should be easily created within one line and you should be able to play them. You need at least 4 attributes in the song class, e.g., name, artist, record label, duration, genre, year released, etc. If the user chooses to “play” a track, your program should output a list of statistics about the track (song). You should have the option to play all.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 5RQ
icon
Related questions
Question

Write a C++ program that allows a user to play your mixtape, one song at a time, or all at once. The program must contain two classes; one class is to represent a Song (track) and one to represent the Mixtape (playlist). You will then create a playlist/mixtape of songs/tracks in your main function.

Songs (or tracks) should be easily created within one line and you should be able to play them. You need at least 4 attributes in the song class, e.g., name, artist, record label, duration, genre, year released, etc. If the user chooses to “play” a track, your program should output a list of statistics about the track (song). You should have the option to play all.  

Requirements:
• Create two separate classes and a main
• The Song class must have 4 private data members (attributes)
• The Song class must have at least 2 public data members (functions)
• The Mixtape class must have at least 1 private data member (attribute)
• The Mixtape class must have at least 2 public data members (functions)
• Your implementation of the mixtape (in main) must have at least 5 songs
Your code must include appropriate comments and documentation
Transcribed Image Text:Requirements: • Create two separate classes and a main • The Song class must have 4 private data members (attributes) • The Song class must have at least 2 public data members (functions) • The Mixtape class must have at least 1 private data member (attribute) • The Mixtape class must have at least 2 public data members (functions) • Your implementation of the mixtape (in main) must have at least 5 songs Your code must include appropriate comments and documentation
Sample Output
1. Play Track 1
2. Play Track 2
3. Play Track 3
4. Play Track 4
5. Play Track 5
6. Play All Tracks
7. Quit
Select an option to play: 6
Title: Have You Ever
Artist: Brandy
Genre: R&B/Soul
Year: 1998
Title: Sunday
Artist: Koryn Hawthorne
Genre: Christian
Year: 2020
Title: Familiar.
Artist: Madison Ryann Ward
Genre: Christian
Year: 2020
Title: Stand Up (from Harriet)
Artist: Cynthia Erivo
Genre: Soundtrack
Year: 2019
Title: I Wanna Dance with Somebody (Who Loves Me)
Artist: Whitney Houston
Genre: R&B/Soul
Year: 1987
Transcribed Image Text:Sample Output 1. Play Track 1 2. Play Track 2 3. Play Track 3 4. Play Track 4 5. Play Track 5 6. Play All Tracks 7. Quit Select an option to play: 6 Title: Have You Ever Artist: Brandy Genre: R&B/Soul Year: 1998 Title: Sunday Artist: Koryn Hawthorne Genre: Christian Year: 2020 Title: Familiar. Artist: Madison Ryann Ward Genre: Christian Year: 2020 Title: Stand Up (from Harriet) Artist: Cynthia Erivo Genre: Soundtrack Year: 2019 Title: I Wanna Dance with Somebody (Who Loves Me) Artist: Whitney Houston Genre: R&B/Soul Year: 1987
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
ADT and Class
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning