Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1. Write a Song Lyrics Creator program to store a list of song lyrics. The information need to be stored are: a. Song composer

Question

1. Write a Song Lyrics Creator program to store a list of song lyrics. The information need to be stored

are:

a. Song composer

b. Song title

c. Lyrics

2. The program should display menu options (refer to sample output below).

3. You may refer to program template provided as guideline.

Program template

//import libraries

struct

Song {

int line; //to show line of lyric

string text; //to store lyric

};

int

menuLyric

() {

//display menu options

//return user choice

}

void addLyric(/*necessary parameters*/) {

//add lyric to the list

}

void

update

Lyric (/*necessary parameters*/) {

//update lyric according to line no entered by user

}

void

displayLyric (/*necessary parameters*/) {

//display song title and lyrics

}

//main function

int main() {

//declaration of struct array and identifiers

//input for song composer and title

//invoke menu

//invoke necessary functions

return 0;

}NRMN SEM 2 2020/2021

Sample Output

Enter your name: Johnny

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Welcome to Song Lyrics Creator Program Johnny

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Enter your song title: My Humpty Dumpty

::MENU::

[1] Add new lyric line

[2] Edit lyric

[3] Display current lyrics

[4] Exit

Enter choice: 1

Option [1] Add new lyric line

Enter your song lyric: Humpty Dumpty sat on the wall

Add more lyric line [Y to continue]: Y

Enter your song lyric: Humpty Dumpty had a great fall

Add more lyric line [Y to continue]: N

::MENU::

[1] Add new lyric line

[2] Edit lyric

[3] Display current lyrics

[4] Exit

Enter choice: 3

Option [3] Display current lyrics

Song composer: Johnny

Song title: My Humpty Dumpty

S 1 ong lyric: Humpty Dumpty sat on the wall

2 Humpty Dumpty had a great fall

::MENU::

[1] Add new lyric line

[2] Edit lyric

[3] Display current lyrics

[4] Exit

E

nter choice: 2NRMN SEM 2 2020/2021

Option [2] Edit lyric

Song lyric:

1 Humpty Dumpty sat on the wall

2 Humpty Dumpty had a great fall

Enter line no to edit: 1

New lyric: Humpty Dumpty sat on the wood

Edit other lyric line [Y to continue]: Y

Song lyric:

1 Humpty Dumpty sat on the wood

2 Humpty Dumpty had a great fall

Enter line no to edit: 2

New lyric: Humpty Dumpty had a great food

Edit other lyric line [Y to continue]: N

::MENU::

[1] Add new lyric line

[2] Edit lyric

[3] Display current lyrics

[4] Exit

Enter choice: 4

Exit program. Thank you Johnny.

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

More Books

Students also viewed these Databases questions

Question

2. Place a value on the outcomes.

Answered: 1 week ago