/*** Saeteurn, San ecst_sfs@ecst.csuchico.edu Program 2: Video Rating System ***/ #include #include #include "video_db.h" using namespace std; Video_db::Video_db() { } /* PostConditions: Adds a new video to the current video Data Base. If video is already in database, averages the rating and inserts it in the one in the data base. */ void Video_db::addVideo(string vidName,string artist,double rating) { bool exists = false;//Flag, if a video of the same type already exists //Defaults to adding when the number of videos in database is zero if (m_videoSize == 0) { m_videos[m_videoSize].setAll(vidName,artist,rating); m_videoSize++; } else { if (m_videoSize < 100) { //Checks if the video already exists in the database for (int i=0;i