(a) Identify the errors in the following code and correct them to produce the output shown in the given sample. You must include comments in your code submission to indicate the error line that was corrected. #include using namespace std; class Singer { string pitch, loudness, timbre; public: Singer () { pitch = 155.; loudness = 60.; timbre = "Tenor"; %3D } Singer (float p) { pitch = p; loudness = 1; timbre = t; } void setVocal(float p, float 1, string t) { pitch = p; loudness = 1; timbre = t; } float getPitch() { float getloud() { string getTimbre() { void display() { return pitch; } return loudness; } return timbre; } cout<<"\n---- --\n"; cout<<"Singer Stats\n"; cout<<". --- \n"; cout<<"Pitch\t: "«loudness<«" Hz"<
(a) Identify the errors in the following code and correct them to produce the output shown in the given sample. You must include comments in your code submission to indicate the error line that was corrected. #include using namespace std; class Singer { string pitch, loudness, timbre; public: Singer () { pitch = 155.; loudness = 60.; timbre = "Tenor"; %3D } Singer (float p) { pitch = p; loudness = 1; timbre = t; } void setVocal(float p, float 1, string t) { pitch = p; loudness = 1; timbre = t; } float getPitch() { float getloud() { string getTimbre() { void display() { return pitch; } return loudness; } return timbre; } cout<<"\n---- --\n"; cout<<"Singer Stats\n"; cout<<". --- \n"; cout<<"Pitch\t: "«loudness<«" Hz"<
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 8RQ
Related questions
Question
c++
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 4 images
Knowledge Booster
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.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,