Final ECE2310
Deliverables:
1. UML design
2. A Word doc that contains your code and the screen shot of the execution window
Submit your solution file to Canvas/Assignment/Final .
Please note that all work of this exam is individual. Plagiarism will NOT be tolerated.
1.(50 Points) Design an object-oriented solution for this:
There is a base class ReadingMaterial and two derived classes Book and Magazine. Book has a date of
publication attribute which is an object of class Date. See below the description of the classes. Add more
member methods to make sure classes and their objects function properly.
Date:
attributes:
month
day
year
ehavior:
XXXXXXXXXXDisplayDate, which displays the date in the format of mm/dd/yyyy
ReadingMaterial :
attributes:
title
price
ehavior:
XXXXXXXXXXread
Book:
Special attributes:
author
date of publication, which is an object of the class Date.
Special behavior:
Donate
Magazine:
Special attributes:
editor-in-chief
Special behavior:
subscribe
Use a Program class to test your design and do the following:
a) Instantiating an object mybook of Book class and an object hermag of Magazine class
[Description of objects:
mybook: “C++ Programming “ author is John Smith, published on 01/09/2021,
price :$100.00
hermag: “Keto for Life” XXXXXXXXXXeditor-in-chief is: Paula Wang, price: $20.00]
) Displaying the following info for mybook: title, author, price
c) Displaying the following info for hermag: title, editor-in-chief, price
d) Reducing the price of hermag from $20.00 to $18.80 using a mutato
property.
e) Displaying the year (not the date) of publication of mybook.