// filename: mreview.cpp // // The implementation file for class Mreview. // This file is partially filled. Students are supposed to add // five methods specified in the assignment sheet. #include "mreview.h" #include #include using namespace std; Mreview::Mreview(string ttl, double score) : title(ttl) { addRating(score); // add the first rating } string Mreview::getTitle() const { return title; } int Mreview::numRatings() const { return ratings.getNumberUsed(); } ostream& operator<<(ostream& os, const Mreview& m) { os << m.title << ", " << m.numRatings() << " ratings."; os << " [" << m.ratings[0]; for (int i = 1; i < m.numRatings(); i++) os << ", " << m.ratings[i]; os << "]"; return os; }