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 . ...

1 answer below »
m


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 behavior: DisplayDate, which displays the date in the format of mm/dd/yyyy ReadingMaterial : attributes: title price behavior: read 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” editor-in-chief is: Paula Wang, price: $20.00] b) 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 mutator/property. e) Displaying the year (not the date) of publication of mybook.
Answered Same DayDec 13, 2022

Answer To: Final ECE2310 Deliverables: 1. UML design 2. A Word doc that contains your code and the...

Vikas answered on Dec 14 2022
30 Votes
Document
Code:
using System;
class Date {
public string month;
public string day;
public
string year;

public Date(string m, string d, string y) {
this.month = m;
this.day = d;
this.year = y;
}

public void displayDate() {
Console.WriteLine(month + "/" + day + "/" + year);
}
}
class ReadingMaterial {
public string title;
public double price;

public ReadingMaterial() {
}

public ReadingMaterial(string t, double p) {
this.price = p;
this.title = t;
}

public void read() {

}
}
class Book : ReadingMaterial {
public...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here