Hi, need help! https://github.com/Seneca-244200/OOP-Project

Hi, need help! https://github.com/Seneca-244200/OOP-Project… Hi, need help!https://github.com/Seneca-244200/OOP-ProjectMilestone 3Streamable Interface module and Publication class moduleAn Interface is an abstract base class with only pure virtual functions.This milestone will include the Date and Utils modules.Before starting to develop milestone 3, please apply the following modifications to the Date module:In Date.cppIn Date::read() method: remove “flushing the keyboard” (i.e. cin.ignore(1000,’n’)) at the end of your read function. The read function should not flush the keyboard when the reading process is done.Add the following global variable (for testing purposes) to the top of the sdds namespace in Date.cpp.  bool sdds_test = false;  int sdds_year = 2022;  int sdds_mon = 8;  int sdds_day = 7;replace systemYear and setToToday methods with the following:  int Date::systemYear()const {     int theYear = sdds_year;     if (!sdds_test) {        time_t t = time(NULL);        tm lt = *localtime(&t);        theYear = lt.tm_year + 1900;     }     return theYear;  }  void Date::setToToday() {     if (sdds_test) {        m_day = sdds_day;        m_mon = sdds_mon;        m_year = sdds_year;     }     else {        time_t t = time(NULL);        tm lt = *localtime(&t);        m_day = lt.tm_mday;        m_mon = lt.tm_mon + 1;        m_year = lt.tm_year + 1900;     }     errCode(NO_ERROR);  }in Date.hAdd the following to the bottom of the sdds namespace; This will make the global variables added to Date.cpp, truly global for any code including “Date.h”.  extern bool sdds_test;  extern int sdds_year;  extern int sdds_mon;  extern int sdds_day;Types of publications in Seneca LibrarySeneca Library holds two types of Publication; Periodical (like newspapers and Magazines) and Books.Publications are not loaned out to members. Members can check them out and read them in the library. These publications are put back on their shelves at the end of the day.Books can be borrowed and returned within 15 days. After 15 days, the member will be charged daily for a late penalty.General definitions of the library system.Create a header file called “Lib.h” to hold all the general values of the system. Add the following and any other general values you find necessary to this header file. This header file should be included anywhere any of these values are needed.const int SDDS_MAX_LOAN_DAYS = 15;     // maximum number of day a publication can be borrowed with no penaltyconst int SDDS_TITLE_WIDTH = 30;   // The width in which the title of a publication should be printed on the consoleconst int SDDS_AUTHOR_WIDTH = 15;   // The width in which the author name of a book should be printed on the consoleconst int SDDS_SHELF_ID_LEN = 4;  // The width in which the shelf id of a publication should be printed on the consoleconst int SDDS_LIBRARY_CAPACITY = 5000;  // Maximum number of publications the library can hold.Streamable Interface Modules.Create an Interface called Streamable to enforce implementation of the following methods. Any class inherited from Streamable will have the capability to be inserted into or extracted from a stream.Streamable Pure Virtual funcitonsAdd the following pure virtual function to Streamable:write pure virtual functionThis method is not capable of modifying the Streamable object. write receives and returns a reference of an ostream object.Functions overriding this function will write into an ostream object.read pure virtual functionread receives and returns a reference of an istream object.Functions overriding this function will read from an istream object.conIOThis method is not capable of modifying the Streamable object. conIo receives a reference of an ios object and returns a Boolean.Functions overriding this function will determine if the incoming ios object is a console IO object or not.Boolean conversion operator overload (pure virtual)Boolean conversion overloads of this method will return if the Streamable object is in a valid state or not.destructorAdd an empty virtual destructor to this interface to guaranty that the descendants of the Streamable are removed from memory with no leak.Insertion operator overloadOverload the insertion operator so a constant object of type Streamable can be written on an ostream object only if the Streamable object is in a valid state. Otherwise, the function will quietly ignore the insertion action.Extraction operator overloadOverload the extraction operator so an object of type Streamable can be read from an istream object.Publication class moduleThe publication class is a general encapsulation of any periodic publication.Later by adding an author to the descendant of the Publication class we will encapsulate a Book for the system.Publication Attributesm_titlem_title is a c-string to hold a dynamic title for the publication.To ease the implementation, let’s assume this dynamic array can not be more than 255 characters long.This attribute is null by default.m_shelfIdHold the location of the publication in the library. m_shelfId is a c-string that is exactly 4 characters long.This attribute is an empty string by default.m_membershipThis attribute is an integer to hold a 5 digit membership number of members of the library.In this class, if the membership number is ‘0’, it means the publication is available and is not checked out by any members.If the membership number is a five-digit number, it means the publication is checked out by the member holding that membership number.This attribute is zero by default.m_libRefThis serial number is used internally to uniquely identify each publication in the system.This attribute is -1 by default.m_dateA Date object.In periodical publications, this date is used for the publish date of the item.In Books, this date is used to keep the date on which the book was borrowed by the member.The Date, by default, is set to the current date.Constructor (default)Sets all the attributes to their default values.MethodsModifiersvirtual void set(int member_id);  // Sets the membership attribute to either zero or a five-digit integer.void setRef(int value);  // Sets the **libRef** attribute valuevoid resetDate();  // Sets the date to the current date of the system.Queriesvirtual char type()const;  //Returns the character ‘P’ to identify this object as a “Publication object”bool onLoan()const;  //Returns true is the publication is checkout (membership is non-zero)Date checkoutDate()const;   //Returns the date attributebool operator==(const char* title)const;  //Returns true if the argument title appears anywhere in the title of the   //publication. Otherwise, it returns false; (use strstr() function in )operator const char* ()const;  //Returns the title attributeint getRef()const;  //Returns the libRef attirbute. Streamable pure virtual function implementationsbool conIO(ios& io)constReturns true if the address of the io object is the same as the address of either the cin object or the cout object.ostream& write(ostream& os) constIf the os argument is a console IO object (use conIO()), print shelfId, title, membership and date attributes as the following format (title is left-justified padded with dots)        1         2         3         4         5         6         7 1234567890123456789012345678901234567890123456789012345678901234567890| P001 | The Toronto Star………….. | 34037 | 2021/11/17 || P007 | Macleans Magazine…………. |  N/A  | 2021/11/11 |Otherwise:Print the type() and then libRef, shelfId, title, membership and date attributes in a tab-separated format.P 2001 P001 The Toronto Star 34037 2021/11/17No newline is printed afterwards either way.istream& read(istream& istr)Read all the values in local variables before setting the attributes to any values.First, clear all the attributes by freeing the memory and setting everything to their default values.Then, if the istr argument is a console IO object (use conIO()) read the attributes as follows:prompt: “Shelf No: “read the shelf number up to its limit (see Lib.h).if the number is not exactly the length it is supposed to be, set the istr to a fail state manually.prompt: “Title: “read the titleprompt: “Date: “read the datein this case the libRef value is left with its default value.Otherwise, assume reading begins with libRef attribute as if the type ‘P’ is not in the file.read the libRef numberskip the tabread the shelf numberskip the tabread the titleskip the tabread the membershipskip the tabread the dateEither way if the date is in an invalid state set the istr to a fail state manuallyAfter the process of reading is done if istr is in a valid state:Dynamically store the title into the title attributecopy the shelf id into the shelfId attributeset the membershipset the dateset the libRef attributeAt the end return the istr argument.operator bool() constReturns true if neither of the title or shelfId attributes is null or empty. Otherwise, it will return false.The Rule of threeMake sure this object complies with the guidelines of the Rule of three so the copying and assignment and destruction are done safely and without any memory leak.the Tester program// Final Project Milestone 3// File ms3_tester.cpp// Version 1.0// Author Fardad Soleimanloo// Revision History// ———————————————————–// Name               Date                 Reason/////////////////////////////////////////////////////////////////#include #include #include “Publication.h”#include “Utils.h”#include “Date.h”using namespace std;using namespace sdds;//Please use putty for termial client on Matrix (https://www.putty.org/)#ifdef _MSC_VER  // Windows Console Colorsconst char col_grey[] = “33[38;5;8m”;const char col_red[] = “33[38;5;9m”;const char col_green[] = “33[38;5;10m”;const char col_yellow[] = “33[38;5;11m”;const char col_blue[] = “33[38;5;12m”;const char col_pink[] = “33[38;5;13m”;const char col_cyan[] = “33[38;5;14m”;const char col_white[] = “33[38;5;15m”;const char col_end[] = “33[0m”;#else // Linux or Mac Console Colorsconst char col_grey[] = “e[38;5;8m”;const char col_red[] = “e[38;5;9m”;const char col_green[] = “e[38;5;10m”;const char col_yellow[] = “e[38;5;11m”;const char col_blue[] = “e[38;5;12m”;const char col_pink[] = “e[38;5;13m”;const char col_cyan[] = “e[38;5;14m”;const char col_white[] = “e[38;5;15m”;const char col_end[] = “e[0m”;#endifvoid revert2Orignal();Publication readPublication(istream& istr);Publication getNextRec(ifstream& ifstr);int main() {  sdds::sdds_test = true;  Publication pd;  revert2Orignal();  cout << "An Invalid publication printout:" << endl;  cout << ">” << pd << "<" << endl;  cout << "Enter the following: " << endl     << col_red << "P1234" << col_end << endl     << "------------------------------" << endl;  pd = readPublication(cin);  if (!cin) {     cin.clear();     cin.ignore(1000, 'n');  }  else {     cout << "This is not supposed to be printed!" << endl;  }  cout << "You entered:" << endl;  cout << ">” << pd << "<" << endl;  cout << "Enter the following: " << endl     << col_red << "P123" << endl     << "Seneca Weekly" << endl     << "2022/13/17" << col_end << endl     << "------------------------------" << endl;  pd = readPublication(cin);  if (!cin) {     cin.clear();     cin.ignore(1000, 'n');  }  else {     cout << "This is not supposed to be printed!" << endl;  }  cout << "You entered:" << endl;  cout << ">” << pd << "<" << endl;  cout << "Enter the following: " << endl     << col_red << "P123" << endl     << "Seneca Weekly" << endl     << "2022/7/17" << col_end << endl     << "------------------------------" << endl;  pd = readPublication(cin);  cout << "You entered:" << endl;  cout << col_green << pd << col_end << endl;  cout << "And the title is agian: "" << (const char*)pd << """ << endl;  pd.set(12345);  if (pd.onLoan()) {     cout << "Now this publication is on loan to a member with the id: 12345" << endl;     pd.resetDate();     cout << "The checkout date is: " << pd.checkoutDate() << endl;     pd.setRef(9999);     cout << "The library unique reference id is: " << pd.getRef() << endl;     cout << col_green << pd << col_end << endl;     cout << "----------------------------------------------------------------" << endl;   }  cout << "Adding the periodical publication to the end of the data file:" << endl;  ofstream fileout("Periodicals.txt", ios::app);  if (pd) {     cout << "appeneded to the file" << endl;     fileout << pd << endl;  }  fileout.close();  cout << endl << "Contents of the file:" << endl;  ifstream filein("Periodicals.txt");  char pType{};  for (int row = 1; filein; row++) {     filein >> pType;     if (pType != ‘P’) {        cout << "The Record type signature is supposed to be B, but it is: " << pType << endl;        filein.setstate(ios::failbit);     }     filein.ignore();     pd = getNextRec(filein);     if (filein) {        if(pd == "Seneca Weekly") cout << col_blue;        cout << (pd.onLoan() ? "|*" : "| ");        cout.width(4);        cout.fill(' ');        cout.setf(ios::right);        cout << row << (pd.onLoan()? "*": " ");        cout.unsetf(ios::right);        cout << pd << (pd == "Star" ? "<<<":"") << endl;        if(pd == "Seneca Weekly") cout << col_end;     }  }  return 0;}void revert2Orignal() {  ifstream infile("PeriodicalsOriginal.txt");  ofstream outfile("Periodicals.txt");  char ch{};  while(infile.get(ch)) {     outfile.put(ch);  }}Publication readPublication(istream& istr) {  Publication P;  istr >> P;  return P;}Publication getNextRec(ifstream& ifstr) {  Publication P;  ifstr >> P;  ifstr.ignore(1000, ‘n’);  return P;}Computer Science Engineering & Technology C++ Programming CPA OOP244

How it works

  1. Paste your instructions in the instructions box. You can also attach an instructions file
  2. Select the writer category, deadline, education level and review the instructions 
  3. Make a payment for the order to be assignment to a writer
  4.  Download the paper after the writer uploads it 

Will the writer plagiarize my essay?

You will get a plagiarism-free paper and you can get an originality report upon request.

Is this service safe?

All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 20% with the discount code ESSAYHELP