CaptainKahuna
Platinum Member
I'm learning C++ at the moment, and our teacher assigned this, and I have no idea how to do it. Can anyone help out? The assignment is below:
---------------------------------------------------------------
Write a program that generates the verse of a children's song shown below. Don't worry about the ungrammatical qualities inherent in the use of "goes" and "go" in your first attempt in writing the program. You should include a function with two parameters capable of generating any of the verses when the appropriate arguments are passed. Strive to make your program "elegant and succinct."
The wheel on the bus goes round round round,
round round round
round round round
The wheel on the bus goes round round round
All through the town
The wipers on the bus goes swish swish swish
swish swish swish
swish swish swish
The wipers on the bus goes swish swish swish
All through the town
The horn on the bus goes beep beep beep
beep beep beep
beep beep beep
The horn on the bus goes beep beep beep
All through the town
The money on the bus goes click click click
click click click
click click click
The money on the bus goes click click click
All through the town
Is it possible to generate a verse of the song based on the lines
The driver on the bus goes move on back
move on back
move on back
With small modifications? How many parameters would the Verse function of such a song have?
-----------------------------------------------------------
Thanks in advance for the help.