Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

just fill out the //implimentations on playlist.cpp if need a class or entrie just make one up i just need the structure of each fuction

just fill out the //implimentations on playlist.cpp if need a class or entrie just make one up i just need the structure of each fuction thx image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
#include #include "PlayList.h" Playlist::PlayList () { first Song=nullptr; lastSong=nullptr; numSongs = 0; playTime - 0; Playlist:: PlayList(PlayList& other) // implement copy-constructor } Playlist::-Playlist() { // implement destructor } int Playlist::getPlayListLength() const { return playTime; int Playlist::getNumSongs() const { return numSongs; void PlayList::printList() const { // implement printList() PlaylistEntry *Playlist::getSong( const int pos ) { // implement get Song void Playlist:: appendSong (Song *song) { // implement appendSong void Playlist::deletesong (Song song) { // implement deleteSong void PlayList::moveUp (PlayListEntry *song) { // implement moveUp void Playlist:: reverseOrder() // implement function reversing the order of Songs #ifndef PLAYLISTENTRY_H #define PLAYLISTENTRY_H #include "Song.h" class PlayListEntry { public: Song *song; PlayListEntry *next; PlayListEntry *prev; = PlayListEntry() { song nullptr; next nullptr; prev nullptr; } #endif // PLAYLISTENTRY { #include #include "Song.h" Song :: Song) { Year = 0; PlayTime 0; } Song: :Song (string title, string artist, string album, int year, int time) : Title(title), Artist(artist), Album(album), Year (year) PlayTime(time) {} string Song::getTitle() const { return Title; void Song: setTitle(const string title) Title - title; string Song::getArtist() const { return Artist; > void Song: : setArtist (const string artist) { Artist - artist; } string Song::getAlbum) const return Album; > void Song::setAlbum (const string album) Album = album; int Song::getYear() const { return Year; void Song::set Year (const int year) { Year = year; int Song:: getPlayTime() const { return PlayTime; void Song::setPlayTime (const int time) { PlayTime = time; void Song::printSong ( const cout using namespace std; class Song { private: string Title; string Artist; string Album; int Year; int PlayTime; public: Song(); Song (string title, string artist, string album, int year, int time); string getTitle() const; void setTitle (const string title ); string getArtist() const; void setArtist (const string artist); string getAlbum() const; void setAlbum (const string album); int getYear() const; void setYear (const int year); int getPlayTime) const; void setPlayTime (const int time ); void print Song() const; }; #endif // SONG_H #ifndef PLAYLIST_H #define PLAYLIST H #include "PlayListEntry.h" #include "Song.h" using namespace std; class Playlist { private: PlayListEntry* first Song; PlayListEntry* lastSong; int numSongs; int playTime; public: Playlist(); PlayList( PlayList& other); -PlayList(); int getPlayListLength() const; int getNumSongs () const; PlayListEntry *getSong( const int pos); void printList() const; // Append a song to the end of the playlist void appendSong (Song *song); // Delete a song from the playlist void deleteSong (Song *song); // Move a song one spot up in the playlist void moveUp (PlayListEntry *entry); 1/ Revert the order of songs on the playlist void reverseOrder(); }; #endif // PLAYLIST_H

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions