Examples --- Sample function call Expected return value True False isValidTune("A5D2E11") False isValidTune("Hello1300") False isValid Tune("A2B4C7") isValid Tune("M5D2E1")
in c++ Write a function called isValidTune that will determine whether or not a given string of arbitrary length is composed exclusively of notes written in valid SPN.
Function Specifications:
The function name: isValidTune
Parameters (Your function should accept these parameters IN THIS ORDER):
string input: The string whose validity should be examined (any length)
Return Value: True if the input is in SPN, false otherwise (bool)
The input string is only considered valid SPN if it consists only of notes within SPN (see examples for more details).
The function should make use of your isValidNote function from question 1.
If the string is empty, then it should not be considered valid SPN and your function should return false.
The function should not print anything.
![Examples ---
Sample function call
isValid Tune("A2B4C7")
Expected
return value
True
isValidTune("M5D2E1")
False
isValid Tune("A5D2E11")
False
isValidTune("Hello1300") False](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe75f6c97-b7a3-4eb0-9894-1724e32b9d95%2Fa30934dc-2e50-4e92-b1e5-2578875c9939%2Fa27hms3_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)