SlideShare a Scribd company logo
1 of 3
Download to read offline
8.19 LAB*: Program: Playlist (c++)
You will be building a linked list. Make sure to keep track of both the head and tail nodes.
(1) Create three files to submit.
PlaylistNode.h - Class declaration
PlaylistNode.cpp - Class definition
main.cpp - main() function
Build the PlaylistNode class per the following specifications. Note: Some functions can initially be
function stubs (empty functions), to be completed in later steps.
Default constructor (1 pt)
Parameterized constructor (1 pt)
Public member functions
InsertAfter() - Mutator (1 pt)
SetNext() - Mutator (1 pt)
GetID() - Accessor
GetSongName() - Accessor
GetArtistName() - Accessor
GetSongLength() - Accessor
GetNext() - Accessor
PrintPlaylistNode()
Private data members
string uniqueID - Initialized to "none" in default constructor
string songName - Initialized to "none" in default constructor
string artistName - Initialized to "none" in default constructor
int songLength - Initialized to 0 in default constructor
PlaylistNode* nextNodePtr - Initialized to 0 in default constructor
Ex. of PrintPlaylistNode output:
(2) In main(), prompt the user for the title of the playlist. (1 pt)
Ex:
(3) Implement the PrintMenu() function. PrintMenu() takes the playlist title as a parameter and
outputs a menu of options to manipulate the playlist. (1 pt)
Ex:
(4) Implement the ExecuteMenu() function that takes 3 parameters: a character representing the
user's choice, a playlist title, and the pointer to the head node of a playlist. ExecuteMenu()
performs the menu options (described below) according to the user's choice, and returns the
pointer to the head node of the playlist.(1 pt)
(5) In main(), call PrintMenu() and prompt for the user's choice of menu options. Each option is
represented by a single character.
If an invalid character is entered, continue to prompt for a valid choice. When a valid option is
entered, execute the option by calling ExecuteMenu() and overwrite the pointer to the head node
of the playlist with the returned pointer. Then, print the menu, and prompt for a new option.
Continue until the user enters 'q'. Hint: Implement Quit before implementing other options. (1 pt)
Ex:
(6) Implement "Output full playlist" menu option in ExecuteMenu(). If the list is empty, output:
Playlist is empty (3 pts)
Ex:
(7) Implement the "Add song" menu option in ExecuteMenu(). New additions are added to the end
of the list. (2 pts)
Ex:
(8) Implement the "Remove song" menu option in ExecuteMenu(). Prompt the user for the unique
ID of the song to be removed.(4 pts)
Ex:
(9) Implement the "Change position of song" menu option in ExecuteMenu(). Prompt the user for
the current position of the song and the desired new position. Valid new positions are 1 - n (the
number of nodes). If the user enters a new position that is less than 1, move the node to the
position 1 (the head). If the user enters a new position greater than n, move the node to position n
(the tail). 6 cases will be tested:
Moving the head node (1 pt)
Moving the tail node (1 pt)
Moving a node to the head (1 pt)
Moving a node to the tail (1 pt)
Moving a node up the list (1 pt)
Moving a node down the list (1 pt)
Ex:
(10) Implement the "Output songs by specific artist" menu option in ExecuteMenu(). Prompt the
user for the artist's name, and output the node's information, starting with the node's current
position. (2 pt)
Ex:
(11) Implement the "Output total time of playlist" menu option in ExecuteMenu(). Output the sum of
the time of the playlist's songs (in seconds). (2 pts)
Ex:
main.cpp
#include <iostream>
#include "PlaylistNode.h"
using namespace std;
void PrintMenu(const string playlistTitle) {
/* Type your code here */
}
PlaylistNode* ExecuteMenu(char option, string playlistTitle, PlaylistNode* headNode) {
/* Type your code here */
return headNode;
}
int main() {
/* Type your code here */
return 0;
}
PlaylistNode.cpp
/* Type your code here */
PlaylistNode.h
/* Type your code here */

More Related Content

Similar to 819 LAB Program Playlist c++ You will be building a li.pdf

Need help with this java project, as the methods are proving to be p.pdf
Need help with this java project, as the methods are proving to be p.pdfNeed help with this java project, as the methods are proving to be p.pdf
Need help with this java project, as the methods are proving to be p.pdfprajeetjain
 
In C++ Plz LAB- Playlist (output linked list) Given main()- complete.pdf
In C++ Plz  LAB- Playlist (output linked list) Given main()- complete.pdfIn C++ Plz  LAB- Playlist (output linked list) Given main()- complete.pdf
In C++ Plz LAB- Playlist (output linked list) Given main()- complete.pdfshreeaadithyaacellso
 
Python summer course play with python (lab1)
Python summer course  play with python  (lab1)Python summer course  play with python  (lab1)
Python summer course play with python (lab1)iloveallahsomuch
 
Python summer course play with python (lab1)
Python summer course  play with python  (lab1)Python summer course  play with python  (lab1)
Python summer course play with python (lab1)iloveallahsomuch
 
816 LAB Playlist output linked list C++ Given main .pdf
816 LAB Playlist output linked list C++ Given main .pdf816 LAB Playlist output linked list C++ Given main .pdf
816 LAB Playlist output linked list C++ Given main .pdfaarokyaaqua
 
OverviewThis project will allow you to write a program to get mo.docx
OverviewThis project will allow you to write a program to get mo.docxOverviewThis project will allow you to write a program to get mo.docx
OverviewThis project will allow you to write a program to get mo.docxjacksnathalie
 
816 LAB Playlist output linked list Hey I have most of.pdf
816 LAB Playlist output linked list Hey I have most of.pdf816 LAB Playlist output linked list Hey I have most of.pdf
816 LAB Playlist output linked list Hey I have most of.pdfsastaindin
 
I need help writing the methods for the song and playList class in J.pdf
I need help writing the methods for the song and playList class in J.pdfI need help writing the methods for the song and playList class in J.pdf
I need help writing the methods for the song and playList class in J.pdfarihanthtextiles
 
Stack linked list
Stack linked listStack linked list
Stack linked listbhargav0077
 
Background Circular Linked List A circular linked list is .pdf
Background Circular Linked List A circular linked list is .pdfBackground Circular Linked List A circular linked list is .pdf
Background Circular Linked List A circular linked list is .pdfaaseletronics2013
 
C++ Background Circular Linked List A circular linked list.pdf
C++ Background Circular Linked List A circular linked list.pdfC++ Background Circular Linked List A circular linked list.pdf
C++ Background Circular Linked List A circular linked list.pdfsaradashata
 
BeepComp - Chiptune Creator - User's Guide (v0.2.2)
BeepComp - Chiptune Creator - User's Guide (v0.2.2)BeepComp - Chiptune Creator - User's Guide (v0.2.2)
BeepComp - Chiptune Creator - User's Guide (v0.2.2)Hiro Morozumi
 
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...Yashpatel821746
 
Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...
Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...
Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...Yashpatel821746
 
PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...
PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...
PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...Yashpatel821746
 
Implement the unsorted single linked list as we did in the class and .pdf
Implement the unsorted single linked list as we did in the class and .pdfImplement the unsorted single linked list as we did in the class and .pdf
Implement the unsorted single linked list as we did in the class and .pdfarihantstoneart
 
III MCS python lab (1).pdf
III MCS python lab (1).pdfIII MCS python lab (1).pdf
III MCS python lab (1).pdfsrxerox
 

Similar to 819 LAB Program Playlist c++ You will be building a li.pdf (20)

Need help with this java project, as the methods are proving to be p.pdf
Need help with this java project, as the methods are proving to be p.pdfNeed help with this java project, as the methods are proving to be p.pdf
Need help with this java project, as the methods are proving to be p.pdf
 
In C++ Plz LAB- Playlist (output linked list) Given main()- complete.pdf
In C++ Plz  LAB- Playlist (output linked list) Given main()- complete.pdfIn C++ Plz  LAB- Playlist (output linked list) Given main()- complete.pdf
In C++ Plz LAB- Playlist (output linked list) Given main()- complete.pdf
 
Python summer course play with python (lab1)
Python summer course  play with python  (lab1)Python summer course  play with python  (lab1)
Python summer course play with python (lab1)
 
Python summer course play with python (lab1)
Python summer course  play with python  (lab1)Python summer course  play with python  (lab1)
Python summer course play with python (lab1)
 
816 LAB Playlist output linked list C++ Given main .pdf
816 LAB Playlist output linked list C++ Given main .pdf816 LAB Playlist output linked list C++ Given main .pdf
816 LAB Playlist output linked list C++ Given main .pdf
 
OverviewThis project will allow you to write a program to get mo.docx
OverviewThis project will allow you to write a program to get mo.docxOverviewThis project will allow you to write a program to get mo.docx
OverviewThis project will allow you to write a program to get mo.docx
 
816 LAB Playlist output linked list Hey I have most of.pdf
816 LAB Playlist output linked list Hey I have most of.pdf816 LAB Playlist output linked list Hey I have most of.pdf
816 LAB Playlist output linked list Hey I have most of.pdf
 
I need help writing the methods for the song and playList class in J.pdf
I need help writing the methods for the song and playList class in J.pdfI need help writing the methods for the song and playList class in J.pdf
I need help writing the methods for the song and playList class in J.pdf
 
Hsjs.pdf
Hsjs.pdfHsjs.pdf
Hsjs.pdf
 
Stack linked list
Stack linked listStack linked list
Stack linked list
 
Background Circular Linked List A circular linked list is .pdf
Background Circular Linked List A circular linked list is .pdfBackground Circular Linked List A circular linked list is .pdf
Background Circular Linked List A circular linked list is .pdf
 
C++ Background Circular Linked List A circular linked list.pdf
C++ Background Circular Linked List A circular linked list.pdfC++ Background Circular Linked List A circular linked list.pdf
C++ Background Circular Linked List A circular linked list.pdf
 
BeepComp - Chiptune Creator - User's Guide (v0.2.2)
BeepComp - Chiptune Creator - User's Guide (v0.2.2)BeepComp - Chiptune Creator - User's Guide (v0.2.2)
BeepComp - Chiptune Creator - User's Guide (v0.2.2)
 
Programs.doc
Programs.docPrograms.doc
Programs.doc
 
AI-Programs.pdf
AI-Programs.pdfAI-Programs.pdf
AI-Programs.pdf
 
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
 
Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...
Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...
Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...
 
PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...
PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...
PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...
 
Implement the unsorted single linked list as we did in the class and .pdf
Implement the unsorted single linked list as we did in the class and .pdfImplement the unsorted single linked list as we did in the class and .pdf
Implement the unsorted single linked list as we did in the class and .pdf
 
III MCS python lab (1).pdf
III MCS python lab (1).pdfIII MCS python lab (1).pdf
III MCS python lab (1).pdf
 

More from meenaaarika

Consider independent simple random samples that are taken to test the.pdf
Consider independent simple random samples that are taken to test the.pdfConsider independent simple random samples that are taken to test the.pdf
Consider independent simple random samples that are taken to test the.pdfmeenaaarika
 
7 If -10--2 Find- a) P(x-x)-0-6- b) P(x-x)-0-9 c) P(x-x)-0-3.pdf
7 If -10--2 Find- a) P(x-x)-0-6- b) P(x-x)-0-9 c) P(x-x)-0-3.pdf7 If -10--2 Find- a) P(x-x)-0-6- b) P(x-x)-0-9 c) P(x-x)-0-3.pdf
7 If -10--2 Find- a) P(x-x)-0-6- b) P(x-x)-0-9 c) P(x-x)-0-3.pdfmeenaaarika
 
1- Why are social networks becoming an increasingly important marketin.pdf
1- Why are social networks becoming an increasingly important marketin.pdf1- Why are social networks becoming an increasingly important marketin.pdf
1- Why are social networks becoming an increasingly important marketin.pdfmeenaaarika
 
Which of the following is NOT true about infectious mononucleosis (-mo.pdf
Which of the following is NOT true about infectious mononucleosis (-mo.pdfWhich of the following is NOT true about infectious mononucleosis (-mo.pdf
Which of the following is NOT true about infectious mononucleosis (-mo.pdfmeenaaarika
 
Three phospholipids X-Y- and Z are distributed in the plasma membrane.pdf
Three phospholipids X-Y- and Z are distributed in the plasma membrane.pdfThree phospholipids X-Y- and Z are distributed in the plasma membrane.pdf
Three phospholipids X-Y- and Z are distributed in the plasma membrane.pdfmeenaaarika
 
The following figure shows two absorption spectra- NAD+is the solid li.pdf
The following figure shows two absorption spectra- NAD+is the solid li.pdfThe following figure shows two absorption spectra- NAD+is the solid li.pdf
The following figure shows two absorption spectra- NAD+is the solid li.pdfmeenaaarika
 
Using the Internet or any other sources- Develop a Presentation on Tim.pdf
Using the Internet or any other sources- Develop a Presentation on Tim.pdfUsing the Internet or any other sources- Develop a Presentation on Tim.pdf
Using the Internet or any other sources- Develop a Presentation on Tim.pdfmeenaaarika
 
Suppose that Paul and Jim play a simultaneous game where they have to.pdf
Suppose that Paul and Jim play a simultaneous game where they have to.pdfSuppose that Paul and Jim play a simultaneous game where they have to.pdf
Suppose that Paul and Jim play a simultaneous game where they have to.pdfmeenaaarika
 
Starlight Company has inventory of 8 units at a cost of $200 each on O.pdf
Starlight Company has inventory of 8 units at a cost of $200 each on O.pdfStarlight Company has inventory of 8 units at a cost of $200 each on O.pdf
Starlight Company has inventory of 8 units at a cost of $200 each on O.pdfmeenaaarika
 
Shell Sort Shell sort is an improvement of insertion sort- Shell sort.pdf
Shell Sort Shell sort is an improvement of insertion sort- Shell sort.pdfShell Sort Shell sort is an improvement of insertion sort- Shell sort.pdf
Shell Sort Shell sort is an improvement of insertion sort- Shell sort.pdfmeenaaarika
 
Sara has gone to her primary care provider and he has expressed concer.pdf
Sara has gone to her primary care provider and he has expressed concer.pdfSara has gone to her primary care provider and he has expressed concer.pdf
Sara has gone to her primary care provider and he has expressed concer.pdfmeenaaarika
 
Evaluate the following discharge summary compared to CMS regulations a.pdf
Evaluate the following discharge summary compared to CMS regulations a.pdfEvaluate the following discharge summary compared to CMS regulations a.pdf
Evaluate the following discharge summary compared to CMS regulations a.pdfmeenaaarika
 
Q37- Which of the following statements about restriction nucleases is.pdf
Q37- Which of the following statements about restriction nucleases is.pdfQ37- Which of the following statements about restriction nucleases is.pdf
Q37- Which of the following statements about restriction nucleases is.pdfmeenaaarika
 
- Implement Longest Common Subsequence using Dynamic Programming appro.pdf
- Implement Longest Common Subsequence using Dynamic Programming appro.pdf- Implement Longest Common Subsequence using Dynamic Programming appro.pdf
- Implement Longest Common Subsequence using Dynamic Programming appro.pdfmeenaaarika
 
Question 1 Identifying each other is a critical part of human society.pdf
Question 1  Identifying each other is a critical part of human society.pdfQuestion 1  Identifying each other is a critical part of human society.pdf
Question 1 Identifying each other is a critical part of human society.pdfmeenaaarika
 
Project Stakeholder Management Communicating with your Sponsor 1) A sp.pdf
Project Stakeholder Management Communicating with your Sponsor 1) A sp.pdfProject Stakeholder Management Communicating with your Sponsor 1) A sp.pdf
Project Stakeholder Management Communicating with your Sponsor 1) A sp.pdfmeenaaarika
 
11- Why are hypothesis testing an important component of statistical i.pdf
11- Why are hypothesis testing an important component of statistical i.pdf11- Why are hypothesis testing an important component of statistical i.pdf
11- Why are hypothesis testing an important component of statistical i.pdfmeenaaarika
 
1) Explain in detail the rola of watar in tha liaht danendent reaction.pdf
1) Explain in detail the rola of watar in tha liaht danendent reaction.pdf1) Explain in detail the rola of watar in tha liaht danendent reaction.pdf
1) Explain in detail the rola of watar in tha liaht danendent reaction.pdfmeenaaarika
 
Find and fix all the errors in the following program- userInput - int.pdf
Find and fix all the errors in the following program- userInput - int.pdfFind and fix all the errors in the following program- userInput - int.pdf
Find and fix all the errors in the following program- userInput - int.pdfmeenaaarika
 
Partner bonuses- statement of partnership equity The partnership of An (1).pdf
Partner bonuses- statement of partnership equity The partnership of An (1).pdfPartner bonuses- statement of partnership equity The partnership of An (1).pdf
Partner bonuses- statement of partnership equity The partnership of An (1).pdfmeenaaarika
 

More from meenaaarika (20)

Consider independent simple random samples that are taken to test the.pdf
Consider independent simple random samples that are taken to test the.pdfConsider independent simple random samples that are taken to test the.pdf
Consider independent simple random samples that are taken to test the.pdf
 
7 If -10--2 Find- a) P(x-x)-0-6- b) P(x-x)-0-9 c) P(x-x)-0-3.pdf
7 If -10--2 Find- a) P(x-x)-0-6- b) P(x-x)-0-9 c) P(x-x)-0-3.pdf7 If -10--2 Find- a) P(x-x)-0-6- b) P(x-x)-0-9 c) P(x-x)-0-3.pdf
7 If -10--2 Find- a) P(x-x)-0-6- b) P(x-x)-0-9 c) P(x-x)-0-3.pdf
 
1- Why are social networks becoming an increasingly important marketin.pdf
1- Why are social networks becoming an increasingly important marketin.pdf1- Why are social networks becoming an increasingly important marketin.pdf
1- Why are social networks becoming an increasingly important marketin.pdf
 
Which of the following is NOT true about infectious mononucleosis (-mo.pdf
Which of the following is NOT true about infectious mononucleosis (-mo.pdfWhich of the following is NOT true about infectious mononucleosis (-mo.pdf
Which of the following is NOT true about infectious mononucleosis (-mo.pdf
 
Three phospholipids X-Y- and Z are distributed in the plasma membrane.pdf
Three phospholipids X-Y- and Z are distributed in the plasma membrane.pdfThree phospholipids X-Y- and Z are distributed in the plasma membrane.pdf
Three phospholipids X-Y- and Z are distributed in the plasma membrane.pdf
 
The following figure shows two absorption spectra- NAD+is the solid li.pdf
The following figure shows two absorption spectra- NAD+is the solid li.pdfThe following figure shows two absorption spectra- NAD+is the solid li.pdf
The following figure shows two absorption spectra- NAD+is the solid li.pdf
 
Using the Internet or any other sources- Develop a Presentation on Tim.pdf
Using the Internet or any other sources- Develop a Presentation on Tim.pdfUsing the Internet or any other sources- Develop a Presentation on Tim.pdf
Using the Internet or any other sources- Develop a Presentation on Tim.pdf
 
Suppose that Paul and Jim play a simultaneous game where they have to.pdf
Suppose that Paul and Jim play a simultaneous game where they have to.pdfSuppose that Paul and Jim play a simultaneous game where they have to.pdf
Suppose that Paul and Jim play a simultaneous game where they have to.pdf
 
Starlight Company has inventory of 8 units at a cost of $200 each on O.pdf
Starlight Company has inventory of 8 units at a cost of $200 each on O.pdfStarlight Company has inventory of 8 units at a cost of $200 each on O.pdf
Starlight Company has inventory of 8 units at a cost of $200 each on O.pdf
 
Shell Sort Shell sort is an improvement of insertion sort- Shell sort.pdf
Shell Sort Shell sort is an improvement of insertion sort- Shell sort.pdfShell Sort Shell sort is an improvement of insertion sort- Shell sort.pdf
Shell Sort Shell sort is an improvement of insertion sort- Shell sort.pdf
 
Sara has gone to her primary care provider and he has expressed concer.pdf
Sara has gone to her primary care provider and he has expressed concer.pdfSara has gone to her primary care provider and he has expressed concer.pdf
Sara has gone to her primary care provider and he has expressed concer.pdf
 
Evaluate the following discharge summary compared to CMS regulations a.pdf
Evaluate the following discharge summary compared to CMS regulations a.pdfEvaluate the following discharge summary compared to CMS regulations a.pdf
Evaluate the following discharge summary compared to CMS regulations a.pdf
 
Q37- Which of the following statements about restriction nucleases is.pdf
Q37- Which of the following statements about restriction nucleases is.pdfQ37- Which of the following statements about restriction nucleases is.pdf
Q37- Which of the following statements about restriction nucleases is.pdf
 
- Implement Longest Common Subsequence using Dynamic Programming appro.pdf
- Implement Longest Common Subsequence using Dynamic Programming appro.pdf- Implement Longest Common Subsequence using Dynamic Programming appro.pdf
- Implement Longest Common Subsequence using Dynamic Programming appro.pdf
 
Question 1 Identifying each other is a critical part of human society.pdf
Question 1  Identifying each other is a critical part of human society.pdfQuestion 1  Identifying each other is a critical part of human society.pdf
Question 1 Identifying each other is a critical part of human society.pdf
 
Project Stakeholder Management Communicating with your Sponsor 1) A sp.pdf
Project Stakeholder Management Communicating with your Sponsor 1) A sp.pdfProject Stakeholder Management Communicating with your Sponsor 1) A sp.pdf
Project Stakeholder Management Communicating with your Sponsor 1) A sp.pdf
 
11- Why are hypothesis testing an important component of statistical i.pdf
11- Why are hypothesis testing an important component of statistical i.pdf11- Why are hypothesis testing an important component of statistical i.pdf
11- Why are hypothesis testing an important component of statistical i.pdf
 
1) Explain in detail the rola of watar in tha liaht danendent reaction.pdf
1) Explain in detail the rola of watar in tha liaht danendent reaction.pdf1) Explain in detail the rola of watar in tha liaht danendent reaction.pdf
1) Explain in detail the rola of watar in tha liaht danendent reaction.pdf
 
Find and fix all the errors in the following program- userInput - int.pdf
Find and fix all the errors in the following program- userInput - int.pdfFind and fix all the errors in the following program- userInput - int.pdf
Find and fix all the errors in the following program- userInput - int.pdf
 
Partner bonuses- statement of partnership equity The partnership of An (1).pdf
Partner bonuses- statement of partnership equity The partnership of An (1).pdfPartner bonuses- statement of partnership equity The partnership of An (1).pdf
Partner bonuses- statement of partnership equity The partnership of An (1).pdf
 

Recently uploaded

會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文中 央社
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptxVishal Singh
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024Borja Sotomayor
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 

Recently uploaded (20)

會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 

819 LAB Program Playlist c++ You will be building a li.pdf

  • 1. 8.19 LAB*: Program: Playlist (c++) You will be building a linked list. Make sure to keep track of both the head and tail nodes. (1) Create three files to submit. PlaylistNode.h - Class declaration PlaylistNode.cpp - Class definition main.cpp - main() function Build the PlaylistNode class per the following specifications. Note: Some functions can initially be function stubs (empty functions), to be completed in later steps. Default constructor (1 pt) Parameterized constructor (1 pt) Public member functions InsertAfter() - Mutator (1 pt) SetNext() - Mutator (1 pt) GetID() - Accessor GetSongName() - Accessor GetArtistName() - Accessor GetSongLength() - Accessor GetNext() - Accessor PrintPlaylistNode() Private data members string uniqueID - Initialized to "none" in default constructor string songName - Initialized to "none" in default constructor string artistName - Initialized to "none" in default constructor int songLength - Initialized to 0 in default constructor PlaylistNode* nextNodePtr - Initialized to 0 in default constructor Ex. of PrintPlaylistNode output: (2) In main(), prompt the user for the title of the playlist. (1 pt) Ex: (3) Implement the PrintMenu() function. PrintMenu() takes the playlist title as a parameter and outputs a menu of options to manipulate the playlist. (1 pt) Ex: (4) Implement the ExecuteMenu() function that takes 3 parameters: a character representing the user's choice, a playlist title, and the pointer to the head node of a playlist. ExecuteMenu() performs the menu options (described below) according to the user's choice, and returns the pointer to the head node of the playlist.(1 pt) (5) In main(), call PrintMenu() and prompt for the user's choice of menu options. Each option is represented by a single character. If an invalid character is entered, continue to prompt for a valid choice. When a valid option is entered, execute the option by calling ExecuteMenu() and overwrite the pointer to the head node
  • 2. of the playlist with the returned pointer. Then, print the menu, and prompt for a new option. Continue until the user enters 'q'. Hint: Implement Quit before implementing other options. (1 pt) Ex: (6) Implement "Output full playlist" menu option in ExecuteMenu(). If the list is empty, output: Playlist is empty (3 pts) Ex: (7) Implement the "Add song" menu option in ExecuteMenu(). New additions are added to the end of the list. (2 pts) Ex: (8) Implement the "Remove song" menu option in ExecuteMenu(). Prompt the user for the unique ID of the song to be removed.(4 pts) Ex: (9) Implement the "Change position of song" menu option in ExecuteMenu(). Prompt the user for the current position of the song and the desired new position. Valid new positions are 1 - n (the number of nodes). If the user enters a new position that is less than 1, move the node to the position 1 (the head). If the user enters a new position greater than n, move the node to position n (the tail). 6 cases will be tested: Moving the head node (1 pt) Moving the tail node (1 pt) Moving a node to the head (1 pt) Moving a node to the tail (1 pt) Moving a node up the list (1 pt) Moving a node down the list (1 pt) Ex: (10) Implement the "Output songs by specific artist" menu option in ExecuteMenu(). Prompt the user for the artist's name, and output the node's information, starting with the node's current position. (2 pt) Ex: (11) Implement the "Output total time of playlist" menu option in ExecuteMenu(). Output the sum of the time of the playlist's songs (in seconds). (2 pts) Ex: main.cpp #include <iostream> #include "PlaylistNode.h"
  • 3. using namespace std; void PrintMenu(const string playlistTitle) { /* Type your code here */ } PlaylistNode* ExecuteMenu(char option, string playlistTitle, PlaylistNode* headNode) { /* Type your code here */ return headNode; } int main() { /* Type your code here */ return 0; } PlaylistNode.cpp /* Type your code here */ PlaylistNode.h /* Type your code here */