Computer Science Homework Solutions
Problem
#107848

C++ Programming and UML

Create a class named MusicalComposition that contains fields for title, composer, and year written.  Include a constructor that requires all three values and a 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.

You will include 3 access specifiers (public, private, protected)

Create a UML diagram for the corresponding code

Solution
What is this?
By OTA - Overall OTA Rating
Yanfang Li, PhD - 4.9/5
Purchase Cost Now
$2.19 CAD (was ~$23.94)
Included in Download
  • Plain text response
  • Attached file(s):
    • test.cpp
    • UML.doc
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
  • The definition of a constructor. - What is a constructor?
  • C++ Programming - Create a class named RealtorCommission. Fields include the sale price of a house, the sales commission rate, and the commission. Create two constructors. Each constructor requires the sales price ( ...
  • Write a constructor - Can someone write a constructor method for the class "Dog" that uses the "this reference" and explain what it does?
  • C++ Programming - A CollegeCourse class includes fields representing department, course number, credit hours, and tuition. Its child, LabCourse, includes one more field that holds a lab fee charged in addition to the ...
  • Stuck on coding Java IOExceptions - My problem is an exception class called ChatIOException that extends from IOException that is imported from the java.io package in order to extend IOException. Also, the ChatIOException class is with ...
Browse