QuestionAnswered step-by-stepREFERENCE : (GITHUB LINK HERE)…Image transcription textMilestone 3 Streamable Interface module and Publicationclass module An Interface is an abstract base class with onlypure virtual functions. This milestone will includ… Show moreImage transcription textin Date.h . Add the following to the bottom of the sddsnamespace: This will make the global variables addedto Date.cpp. truly global for any code incl… Show moreImage transcription textStreamable Pure Virtual funcitons Add the followingpure virtual function to Streamable: write purevirtual function This method is not cap… Show moreImage transcription textPublication class module The publication class is a generalencapsulation of any periodic publication. Later by adding anauthor to the descendant of the Publication class… Show moreImage transcription textMethods Modifiers virtual void set (int member_id) ; // Setsthe membership attribute to either zero or a five-digit integer.void setRef (int value); // Sets the **libRef** attri… Show moreImage transcription textNo newline is printed afterwards either way. istrean?read{istrean1& istr) Read all the values in local variablesbefore setting the attributes to any values. First…. Show moreImage transcription textThe Rule of three Make sure this objectcomplies with the guidelines of theRule of three so the copyi… Show moreREFERENCE : (GITHUB LINK HERE)https://github.com/Seneca-244200/BTP-Project THIS LINK BELONGS TO THE SENECA COLLEGE IN CANADA PLEASE PROVIDE CODE FILES AS MENTIONED IN THE “Submission Files” ALSOPROVIDE SCREENSHOTS OF THE WORKING PROGRAM!!! NOTE: I already added the all same instructions from this link, if you want you can also look! //Submission FilesUtils.cpp // Not required ( functions can be used instead) Utils.h // Not required ( functions can be used instead)Date.cpp // Most of the code provided BUT SOME FUNCTIONS REQUIRED to be added or modified) Date.h // Most of the code provided BUT SOME FUNCTIONS REQUIRED to be added or modified)Streamable.cpp // REQUIRED TO BE WRITTENStreamable.h // REQUIRED TO BE WRITTENPublication.cpp // REQUIRED TO BE WRITTENPublication.h // REQUIRED TO BE WRITTENPeriodicals.txt // PROVIDED BELOWms3_tester.cpp // PROVIDED BELOW PLEASE PROVIDE CODE FILES AS MENTIONED IN THE “Submission Files” ALSOPROVIDE SCREENSHOTS OF THE WORKING PROGRAM!!! PLEASE DO NOT MODIFY OR CHANGE THE TESTER PROGRAM ( ms3_tester.cpp )//the Tester program ( ms3_tester.cpp )// 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;} //Periodicals.txtP 2001 P001 The Toronto Star 34037 2022/7/17P 2002 P001 The Toronto Star 39710 2022/7/11P 2003 P001 The Toronto Star 0 2022/7/24P 2004 P001 The Toronto Star 13059 2022/7/18P 2005 P001 The Toronto Star 61842 2022/7/17P 2006 P001 The Toronto Star 0 2022/7/25P 2007 P001 The Toronto Star 26742 2022/7/18P 2008 P001 The Toronto Star 82938 2022/7/22P 2009 P001 The Toronto Star 68014 2022/7/15P 2010 P001 The Toronto Star 0 2022/7/18P 2011 P001 The Toronto Star 42166 2022/7/23P 2012 P001 The Toronto Star 98201 2022/7/12P 2013 P001 The Toronto Star 34078 2022/7/12P 2014 P001 The Toronto Star 0 2022/7/20P 2015 P001 The Toronto Star 86711 2022/7/16P 2016 P001 The Toronto Star 52095 2022/7/17P 2017 P001 The Toronto Star 0 2022/7/17P 2018 P001 The Toronto Star 72323 2022/7/11P 2019 P001 The Toronto Star 81467 2022/7/24P 2020 P001 The Toronto Star 44322 2022/7/18P 2021 P001 The Toronto Star 0 2022/7/17P 2022 P001 The Toronto Star 84453 2022/7/25P 2023 P001 The Toronto Star 0 2022/7/18P 2024 P001 The Toronto Star 57952 2022/7/22P 2025 P001 The Toronto Star 65352 2022/7/15P 2026 P001 The Toronto Star 59731 2022/7/18P 2027 P001 The Toronto Star 0 2022/7/23P 2028 P001 The Toronto Star 87403 2022/7/12P 2029 P001 The Toronto Star 63899 2022/7/12P 2030 P001 The Toronto Star 0 2022/7/20P 2031 P001 The Toronto Star 34584 2022/7/16P 2032 P001 The Toronto Star 0 2022/7/17P 2033 P001 The Toronto Star 23119 2022/7/17P 2034 P001 The Toronto Star 38659 2022/7/11P 2035 P001 The Toronto Star 0 2022/7/24P 2036 P001 The Toronto Star 35869 2022/7/18P 2037 P001 The Toronto Star 0 2022/7/17P 2038 P001 The Toronto Star 39753 2022/7/25P 2039 P001 The Toronto Star 26886 2022/7/18P 2040 P001 The Toronto Star 72671 2022/7/22P 2041 P001 The Toronto Star 0 2022/7/15P 2042 P001 The Toronto Star 48156 2022/7/18P 2043 P001 The Toronto Star 92226 2022/7/23P 2044 P001 The Toronto Star 72803 2022/7/12P 2045 P001 The Toronto Star 47217 2022/7/12P 2046 P001 The Toronto Star 0 2022/7/20P 2047 P001 The Toronto Star 0 2022/7/16P 2048 P001 The Toronto Star 98926 2022/7/17P 2049 P001 The Toronto Star 0 2022/7/17P 2050 P004 Hello! Canada Magazine 89606 2022/7/11P 2051 P006 Hello! Canada Magazine 34087 2022/7/24P 2052 P006 Hello! Canada Magazine 91257 2022/7/18P 2053 P006 Hello! Canada Magazine 0 2022/7/17P 2054 P006 Hello! Canada Magazine 15853 2022/7/25P 2055 P006 Hello! Canada Magazine 0 2022/7/18P 2056 P006 Hello! Canada Magazine 77163 2022/7/22P 2057 P006 Hello! Canada Magazine 19525 2022/7/15P 2058 P006 Hello! Canada Magazine 80506 2022/7/18P 2059 P006 Hello! Canada Magazine 64345 2022/7/23P 2060 P006 Hello! Canada Magazine 63664 2022/7/12P 2061 P006 Hello! Canada Magazine 0 2022/7/12P 2062 P006 Hello! Canada Magazine 83701 2022/7/20P 2063 P006 Hello! Canada Magazine 67334 2022/7/16P 2064 P007 Macleans Magazine 69613 2022/7/17P 2065 P007 Macleans Magazine 51529 2022/7/17P 2066 P007 Macleans Magazine 0 2022/7/11P 2067 P007 Macleans Magazine 26730 2022/7/24P 2068 P007 Macleans Magazine 67044 2022/7/18P 2069 P007 Macleans Magazine 37529 2022/7/17P 2070 P007 Macleans Magazine 0 2022/7/25P 2071 P007 Macleans Magazine 11246 2022/7/18P 2072 P007 Macleans Magazine 49225 2022/7/22P 2073 P007 Macleans Magazine 0 2022/7/15P 2074 P007 Macleans Magazine 27658 2022/7/18P 2075 P007 Macleans Magazine 64706 2022/7/23P 2076 P007 Macleans Magazine 71447 2022/7/12P 2077 P007 Macleans Magazine 92433 2022/7/12P 2078 P007 Macleans Magazine 0 2022/7/20P 2079 P008 MoneySense Magazine 72614 2022/7/16P 2080 P008 MoneySense Magazine 48096 2022/7/17P 2081 P008 MoneySense Magazine 89325 2022/7/17P 2082 P008 MoneySense Magazine 0 2022/7/11P 2083 P008 MoneySense Magazine 70451 2022/7/24P 2084 P008 MoneySense Magazine 0 2022/7/18P 2085 P008 MoneySense Magazine 33074 2022/7/17P 2086 P008 Canadian Running Magazine 77051 2022/7/25P 2087 P008 Canadian Running Magazine 0 2022/7/18P 2088 P008 Canadian Running Magazine 86255 2022/7/22P 2089 P008 Canadian Running Magazine 0 2022/7/15P 2090 P008 Canadian Running Magazine 46886 2022/7/18P 2091 P008 Canadian Running Magazine 0 2022/7/23P 2092 P008 Canadian Cycling Magazine 21655 2022/7/12P 2093 P008 Canadian Cycling Magazine 64198 2022/7/12P 2094 P008 Canadian Cycling Magazine 0 2022/7/20P 2095 P008 Canadian Cycling Magazine 53448 2022/7/16P 2096 P008 Canadian Cycling Magazine 59523 2022/7/17P 2097 P008 Canadian Cycling Magazine 0 2022/7/17P 2098 P008 Canadian Cycling Magazine 40289 2022/7/11P 2099 P002 The Toronto SUN 85176 2022/7/17P 2100 P002 The Toronto SUN 28146 2022/7/11P 2101 P002 The Toronto SUN 0 2022/7/24P 2102 P002 The Toronto SUN 23427 2022/7/18P 2103 P002 The Toronto SUN 22084 2022/7/17P 2104 P002 The Toronto SUN 63895 2022/7/25P 2105 P002 The Toronto SUN 0 2022/7/18P 2106 P002 The Toronto SUN 85033 2022/7/22P 2107 P002 The Toronto SUN 21536 2022/7/15P 2108 P002 The Toronto SUN 0 2022/7/18P 2109 P002 The Toronto SUN 39638 2022/7/23P 2110 P002 The Toronto SUN 63671 2022/7/12P 2111 P002 The Toronto SUN 0 2022/7/12P 2112 P002 The Toronto SUN 44716 2022/7/20P 2113 P002 The Toronto SUN 58452 2022/7/16P 2114 P002 The Toronto SUN 0 2022/7/17P 2115 P002 The Toronto SUN 67138 2022/7/17P 2116 P002 The Toronto SUN 58790 2022/7/11P 2117 P002 The Toronto SUN 71094 2022/7/24P 2118 P002 The Toronto SUN 0 2022/7/18P 2119 P002 The Toronto SUN 91776 2022/7/17P 2120 P002 The Toronto SUN 60740 2022/7/25P 2121 P002 The Toronto SUN 33219 2022/7/18P 2122 P002 The Toronto SUN 0 2022/7/22P 2123 P002 The Toronto SUN 45379 2022/7/15P 2124 P002 The Toronto SUN 12208 2022/7/18P 2125 P002 The Toronto SUN 36345 2022/7/23P 2126 P002 The Toronto SUN 42016 2022/7/12P 2127 P002 The Toronto SUN 0 2022/7/12P 2128 P002 The Toronto SUN 92784 2022/7/20P 2129 P002 The Toronto SUN 41932 2022/7/16P 2130 P002 The Toronto SUN 0 2022/7/17P 2131 P002 The Toronto SUN 62045 2022/7/17P 2132 P002 The Toronto SUN 21313 2022/7/11P 2133 P002 The Toronto SUN 46369 2022/7/24P 2134 P002 The Toronto SUN 56133 2022/7/18P 2135 P002 The Toronto SUN 0 2022/7/17P 2136 P002 The Toronto SUN 84493 2022/7/25P 2137 P002 The Toronto SUN 64604 2022/7/18P 2138 P002 The Toronto SUN 58843 2022/7/22P 2139 P002 The Toronto SUN 0 2022/7/15P 2140 P002 The Toronto SUN 21602 2022/7/18P 2141 P002 The Toronto SUN 81536 2022/7/23P 2142 P002 The Toronto SUN 43553 2022/7/12P 2143 P002 The Toronto SUN 0 2022/7/12P 2144 P002 The Toronto SUN 86012 2022/7/20P 2145 P002 The Toronto SUN 26140 2022/7/16P 2146 P002 The Toronto SUN 63311 2022/7/17P 2147 P002 The Toronto SUN 74505 2022/7/17 //Date.cpp// Final Project Milestone 1// Date Module// File Date.cpp// Version 1.0// Author Fardad Soleimanloo// Revision History// ———————————————————–// Name Date Reason/////////////////////////////////////////////////////////////////#define _CRT_SECURE_NO_WARNINGS#include #include #include using namespace std;#include “Date.h”namespace sdds { bool Date::validate() { errCode(NO_ERROR); if (m_year < MIN_YEAR || m_year > m_CUR_YEAR + 1) { errCode(YEAR_ERROR); } else if (m_mon < 1 || m_mon > 12) { errCode(MON_ERROR); } else if (m_day < 1 || m_day > mdays()) { errCode(DAY_ERROR); } return !bad(); } int Date::mdays()const { int days[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, -1 }; int mon = m_mon >= 1 && m_mon <= 12 ? m_mon : 13; mon--; return days[mon] + int((mon == 1) * ((m_year % 4 == 0) && (m_year % 100 != 0)) || (m_year % 400 == 0)); } int Date::systemYear()const { time_t t = time(NULL); tm lt = *localtime(&t); return lt.tm_year + 1900; } void Date::setToToday() { 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); } int Date::daysSince0001_1_1()const { // Rata Die day since 0001/01/01 int ty = m_year; int tm = m_mon; if (tm < 3) { ty--; tm += 12; } return 365 * ty + ty / 4 - ty / 100 + ty / 400 + (153 * tm - 457) / 5 + m_day - 306; } Date::Date() :m_CUR_YEAR(systemYear()) { setToToday(); } Date::Date(int year, int mon, int day) : m_CUR_YEAR(systemYear()) { m_year = year; m_mon = mon; m_day = day; validate(); } const char* Date::dateStatus()const { return DATE_ERROR[errCode()]; } int Date::currentYear()const { return m_CUR_YEAR; } void Date::errCode(int readErrorCode) { m_ErrorCode = readErrorCode; } int Date::errCode()const { return m_ErrorCode; } bool Date::bad()const { return m_ErrorCode != 0; } ostream& operator<<(ostream& os, const Date& RO) { return RO.write(os); } istream& operator>>(istream& is, Date& RO) { return RO.read(is); }} //Date.h// Final Project Milestone 1// Date Module// File Date.h// Version 1.0// Author Fardad Soleimanloo// Revision History// ———————————————————–// Name Date Reason/////////////////////////////////////////////////////////////////#ifndef SDDS_DATE_H__#define SDDS_DATE_H__#include namespace sdds { const int NO_ERROR = 0; const int CIN_FAILED = 1; const int YEAR_ERROR = 2; const int MON_ERROR = 3; const int DAY_ERROR = 4; const char DATE_ERROR[5][16] = { “No Error”, “cin Failed”, “Bad Year Value”, “Bad Month Value”, “Bad Day Value” }; const int MIN_YEAR = 1500; class Date { private: int m_year; int m_mon; int m_day; int m_ErrorCode; int m_CUR_YEAR; int daysSince0001_1_1()const; // returns number of days passed since the date 0001/1/1 bool validate(); /* validates the date setting the error code and then returning the result true, if valid, and false if invalid.*/ void errCode(int); // sets the error code int systemYear()const; // returns the current system year bool bad()const; // return true if int mdays()const; // returns the number of days in current month void setToToday(); // sets the date to the current date (system date) public: Date(); // creates a date with current date Date(int year, int mon, int day); /* create a date with assigned values then validates the date and sets the error code accordingly */ int errCode()const; // returns the error code or zero if date is valid const char* dateStatus()const; // returns a string corresponding the current status of the date int currentYear()const; // returns the m_CUR_YEAR value; }; std::ostream& operator<<(std::ostream& os, const Date& RO); std::istream& operator>>(std::istream& is, Date& RO);}#endif Computer ScienceEngineering & TechnologyObject-Oriented ProgrammingOOP 244Share Question
How it works
Paste your instructions in the instructions box. You can also attach an instructions file
Select the writer category, deadline, education level and review the instructions
Make a payment for the order to be assignment to a writer
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
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.
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.
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.
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.