In this lab we will create three functions. The first will be called main. Main will simply be the first function executed and will call the other two functions. It will take in no arguments and will only create an empty list and call the otber two functions. FUNCTION TwO: GETDATAQ Getdata() will take in a list and then prompt the user to enter a song as a string in the format of song-band. You may assume the user will correctly enter this data. These songs will be appended to our list. The user can continue entering songs until they enter "exit". FUNCTION THREE: PLAYRANDOMO PlayRandom() will take in a list. It will then generate a random number and use it as index to select a random song to print "Now Playing: RandomSongHere". SAMPLE OUTPUT Enter a song title and band (song-band) or exit to quit: I Found- Amber Run

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.5: Case Studies
Problem 3E
icon
Related questions
Question
FUNCTION ONE: MAINO
In this lab we will create three functions. The first will be called
main. Main will simply be the first function executed and will
call the other two funetions. It will take in no arguments and
will only create an empty list and call the other two functions.
FUNCTION TWO: GETDATAO
Getdata() will take in a list and then prompt the user to enter a
song as a string in the format of song-band. You may assume
the user will correctly enter this data. These songs will be
appended to our list. The user can continue entering songs until
they enter "exit".
FUNCTION THREE: PLAYRANDOMO
PlayRandom() will take in a list. It will then generate a random
number and use it as index to select a random song to print
"Now Playing: RandomSongHere".
SAMPLE OUTPUT
Enter a song title and band (song-band) or exit to quit: I Found-
Amber Run
Enter a song title and band (song-band) or exit to quit: Bark At
The Moon-Ozzy Osbourne
Enter a song title and band (song-band) or exit to quit: Real
World-Matchbox 20
Enter a song title and band (song-band) or exit to quit: The
Beginning of the End-H.L.M.
Enter a song title and band (song-band) or exit to quit: Noise-
Nightwish
Enter a song title and band (song-band) or exit to quit: Hevioso-
The 69 Eyes
Enter a song title and band (song-band) or exit to quit: Falls
Apart-Hurt
Enter a song title and band (song-band) or exit to quit: Sound of
Winter-Bush
Enter a song title and band (song-band) or exit to quit: Crooked
Spoons-Otep
Enter a song title and band (song-band) or exit to quit: Devil
and the Deep Dark Occan-Nightwish
Enter a song title and band (song-band) or exit to quit: exit
Now Playing: The Beginning of the End-H.L.M.
Transcribed Image Text:FUNCTION ONE: MAINO In this lab we will create three functions. The first will be called main. Main will simply be the first function executed and will call the other two funetions. It will take in no arguments and will only create an empty list and call the other two functions. FUNCTION TWO: GETDATAO Getdata() will take in a list and then prompt the user to enter a song as a string in the format of song-band. You may assume the user will correctly enter this data. These songs will be appended to our list. The user can continue entering songs until they enter "exit". FUNCTION THREE: PLAYRANDOMO PlayRandom() will take in a list. It will then generate a random number and use it as index to select a random song to print "Now Playing: RandomSongHere". SAMPLE OUTPUT Enter a song title and band (song-band) or exit to quit: I Found- Amber Run Enter a song title and band (song-band) or exit to quit: Bark At The Moon-Ozzy Osbourne Enter a song title and band (song-band) or exit to quit: Real World-Matchbox 20 Enter a song title and band (song-band) or exit to quit: The Beginning of the End-H.L.M. Enter a song title and band (song-band) or exit to quit: Noise- Nightwish Enter a song title and band (song-band) or exit to quit: Hevioso- The 69 Eyes Enter a song title and band (song-band) or exit to quit: Falls Apart-Hurt Enter a song title and band (song-band) or exit to quit: Sound of Winter-Bush Enter a song title and band (song-band) or exit to quit: Crooked Spoons-Otep Enter a song title and band (song-band) or exit to quit: Devil and the Deep Dark Occan-Nightwish Enter a song title and band (song-band) or exit to quit: exit Now Playing: The Beginning of the End-H.L.M.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Lists
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr