Create a class named MusicalComposition that contains fields for title, composer, and year written. Include a constructor that requires all three values and an appropriate display function. The child class NationalAnthem contains an additional field that holds the name of the anthem’s nation. The child class constructor requires a value for this additional field. The child class also contains a display function. Write a main()function that instantiates objects of each class and demonstrates that the functions work correctly. Save the file as Compositions.cpp.
1
Expert's answer
2017-12-25T03:45:07-0500
#include <iostream> #include <string> using namespace std; class MusicalComposition { protected: string my_title; string my_composer; int my_year;
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment