SlideShare a Scribd company logo
You are required to implement all the classes as specified by UML diagram below.The objective
of most of the methods is obvious from the given method name and input parameters.I am listing
below the explanation of the not-so-obvious methods.
PlayList Class:
getSong(pos:int) :Song
a method that returns the song that is located in the given position (pos). If there is no song in the
given position then the method returns null
getSongPosition(title:String):int
a method that takes the song title as input and returns as output the position of the song in the
list. If not found, the method returns -1. Song -title:String -artist: String +Song (title:String,
artist:String) +gettitle ():String +getArtist ):String +tostring ) :String PlayList
maxNumOfSongs:int -currentNumor Songs: int; +PlayList (maxNumOESongs:int)
+getcurrentNumSongs ) :int +addsong (title:String, artist:String) :void +addsong
(song:Song):void +getsong (pos:int) :Song +getsongPosition (title:String) :int User nam String -
favoriteSongs: PlayList +User (name: String, favoriteSongs: PlayList) +User (name: String)
+setFavoriteSongs (1ist: PlayList) :void +getFavoriteSongs) PlayList; +getsong (title:String)
:Song +addsong (title:String, artist:String) :void tartistsongCount (artist:String) :int +tostring ()
:String
Solution
Please find the implementation of all the classes mentioned in the above UML diagram. Please
see comment against each line to get to know the explanation :

More Related Content

More from arorasales234

Our best evidence to data suggests that the Earth formed 4.6 billion .pdf
Our best evidence to data suggests that the Earth formed 4.6 billion .pdfOur best evidence to data suggests that the Earth formed 4.6 billion .pdf
Our best evidence to data suggests that the Earth formed 4.6 billion .pdf
arorasales234
 
one human resource manager recently got a thank you note on her iPho.pdf
one human resource manager recently got a thank you note on her iPho.pdfone human resource manager recently got a thank you note on her iPho.pdf
one human resource manager recently got a thank you note on her iPho.pdf
arorasales234
 
Mutations rII1 and rII2 are known to fall into the rIIA and rIIB cis.pdf
Mutations rII1 and rII2 are known to fall into the rIIA and rIIB cis.pdfMutations rII1 and rII2 are known to fall into the rIIA and rIIB cis.pdf
Mutations rII1 and rII2 are known to fall into the rIIA and rIIB cis.pdf
arorasales234
 
Money laundering has become a mechanism for financing terrorist acti.pdf
Money laundering has become a mechanism for financing terrorist acti.pdfMoney laundering has become a mechanism for financing terrorist acti.pdf
Money laundering has become a mechanism for financing terrorist acti.pdf
arorasales234
 
Let X and Y be continuous r.v. with joint density functionPlease g.pdf
Let X and Y be continuous r.v. with joint density functionPlease g.pdfLet X and Y be continuous r.v. with joint density functionPlease g.pdf
Let X and Y be continuous r.v. with joint density functionPlease g.pdf
arorasales234
 
Independent auditors must provide dual opinions. What are these two .pdf
Independent auditors must provide dual opinions. What are these two .pdfIndependent auditors must provide dual opinions. What are these two .pdf
Independent auditors must provide dual opinions. What are these two .pdf
arorasales234
 
Imperialism and Nationalism are often incongruous concepts that exis.pdf
Imperialism and Nationalism are often incongruous concepts that exis.pdfImperialism and Nationalism are often incongruous concepts that exis.pdf
Imperialism and Nationalism are often incongruous concepts that exis.pdf
arorasales234
 
Imagine that you plant the massive seed from inside an avocado. You p.pdf
Imagine that you plant the massive seed from inside an avocado. You p.pdfImagine that you plant the massive seed from inside an avocado. You p.pdf
Imagine that you plant the massive seed from inside an avocado. You p.pdf
arorasales234
 
Identify three traits each that distinguish channels from carriers. .pdf
Identify three traits each that distinguish channels from carriers. .pdfIdentify three traits each that distinguish channels from carriers. .pdf
Identify three traits each that distinguish channels from carriers. .pdf
arorasales234
 
i am trying to get this library file income.js using this, to be loa.pdf
i am trying to get this library file income.js using this, to be loa.pdfi am trying to get this library file income.js using this, to be loa.pdf
i am trying to get this library file income.js using this, to be loa.pdf
arorasales234
 
Explain why it can be problematic to base morality and ethics only o.pdf
Explain why it can be problematic to base morality and ethics only o.pdfExplain why it can be problematic to base morality and ethics only o.pdf
Explain why it can be problematic to base morality and ethics only o.pdf
arorasales234
 
Discuss the reasons why the Human Microbiome Project is a step forwa.pdf
Discuss the reasons why the Human Microbiome Project is a step forwa.pdfDiscuss the reasons why the Human Microbiome Project is a step forwa.pdf
Discuss the reasons why the Human Microbiome Project is a step forwa.pdf
arorasales234
 
Describe what is happening in Italy (or you may substitute Argentina.pdf
Describe what is happening in Italy (or you may substitute Argentina.pdfDescribe what is happening in Italy (or you may substitute Argentina.pdf
Describe what is happening in Italy (or you may substitute Argentina.pdf
arorasales234
 
Consider an extension of the queue abstract data type, called a .pdf
Consider an extension of the queue abstract data type, called a .pdfConsider an extension of the queue abstract data type, called a .pdf
Consider an extension of the queue abstract data type, called a .pdf
arorasales234
 
Cordia Corporation is planning a 15 year project with an initial inv.pdf
Cordia Corporation is planning a 15 year project with an initial inv.pdfCordia Corporation is planning a 15 year project with an initial inv.pdf
Cordia Corporation is planning a 15 year project with an initial inv.pdf
arorasales234
 
Case study on Queensland Health Payroll Debacle & Queensland Governm.pdf
Case study on Queensland Health Payroll Debacle & Queensland Governm.pdfCase study on Queensland Health Payroll Debacle & Queensland Governm.pdf
Case study on Queensland Health Payroll Debacle & Queensland Governm.pdf
arorasales234
 
Can you give an example of a binary heap programCan you give an .pdf
Can you give an example of a binary heap programCan you give an .pdfCan you give an example of a binary heap programCan you give an .pdf
Can you give an example of a binary heap programCan you give an .pdf
arorasales234
 
All businesses, small or large, depend on data centers. Answer the f.pdf
All businesses, small or large, depend on data centers. Answer the f.pdfAll businesses, small or large, depend on data centers. Answer the f.pdf
All businesses, small or large, depend on data centers. Answer the f.pdf
arorasales234
 
A) The linearity condition is not satisfied. B) The linearity cond.pdf
A) The linearity condition is not satisfied. B) The linearity cond.pdfA) The linearity condition is not satisfied. B) The linearity cond.pdf
A) The linearity condition is not satisfied. B) The linearity cond.pdf
arorasales234
 
4. Records of the missions of Baja California in the form of baptism.pdf
4. Records of the missions of Baja California in the form of baptism.pdf4. Records of the missions of Baja California in the form of baptism.pdf
4. Records of the missions of Baja California in the form of baptism.pdf
arorasales234
 

More from arorasales234 (20)

Our best evidence to data suggests that the Earth formed 4.6 billion .pdf
Our best evidence to data suggests that the Earth formed 4.6 billion .pdfOur best evidence to data suggests that the Earth formed 4.6 billion .pdf
Our best evidence to data suggests that the Earth formed 4.6 billion .pdf
 
one human resource manager recently got a thank you note on her iPho.pdf
one human resource manager recently got a thank you note on her iPho.pdfone human resource manager recently got a thank you note on her iPho.pdf
one human resource manager recently got a thank you note on her iPho.pdf
 
Mutations rII1 and rII2 are known to fall into the rIIA and rIIB cis.pdf
Mutations rII1 and rII2 are known to fall into the rIIA and rIIB cis.pdfMutations rII1 and rII2 are known to fall into the rIIA and rIIB cis.pdf
Mutations rII1 and rII2 are known to fall into the rIIA and rIIB cis.pdf
 
Money laundering has become a mechanism for financing terrorist acti.pdf
Money laundering has become a mechanism for financing terrorist acti.pdfMoney laundering has become a mechanism for financing terrorist acti.pdf
Money laundering has become a mechanism for financing terrorist acti.pdf
 
Let X and Y be continuous r.v. with joint density functionPlease g.pdf
Let X and Y be continuous r.v. with joint density functionPlease g.pdfLet X and Y be continuous r.v. with joint density functionPlease g.pdf
Let X and Y be continuous r.v. with joint density functionPlease g.pdf
 
Independent auditors must provide dual opinions. What are these two .pdf
Independent auditors must provide dual opinions. What are these two .pdfIndependent auditors must provide dual opinions. What are these two .pdf
Independent auditors must provide dual opinions. What are these two .pdf
 
Imperialism and Nationalism are often incongruous concepts that exis.pdf
Imperialism and Nationalism are often incongruous concepts that exis.pdfImperialism and Nationalism are often incongruous concepts that exis.pdf
Imperialism and Nationalism are often incongruous concepts that exis.pdf
 
Imagine that you plant the massive seed from inside an avocado. You p.pdf
Imagine that you plant the massive seed from inside an avocado. You p.pdfImagine that you plant the massive seed from inside an avocado. You p.pdf
Imagine that you plant the massive seed from inside an avocado. You p.pdf
 
Identify three traits each that distinguish channels from carriers. .pdf
Identify three traits each that distinguish channels from carriers. .pdfIdentify three traits each that distinguish channels from carriers. .pdf
Identify three traits each that distinguish channels from carriers. .pdf
 
i am trying to get this library file income.js using this, to be loa.pdf
i am trying to get this library file income.js using this, to be loa.pdfi am trying to get this library file income.js using this, to be loa.pdf
i am trying to get this library file income.js using this, to be loa.pdf
 
Explain why it can be problematic to base morality and ethics only o.pdf
Explain why it can be problematic to base morality and ethics only o.pdfExplain why it can be problematic to base morality and ethics only o.pdf
Explain why it can be problematic to base morality and ethics only o.pdf
 
Discuss the reasons why the Human Microbiome Project is a step forwa.pdf
Discuss the reasons why the Human Microbiome Project is a step forwa.pdfDiscuss the reasons why the Human Microbiome Project is a step forwa.pdf
Discuss the reasons why the Human Microbiome Project is a step forwa.pdf
 
Describe what is happening in Italy (or you may substitute Argentina.pdf
Describe what is happening in Italy (or you may substitute Argentina.pdfDescribe what is happening in Italy (or you may substitute Argentina.pdf
Describe what is happening in Italy (or you may substitute Argentina.pdf
 
Consider an extension of the queue abstract data type, called a .pdf
Consider an extension of the queue abstract data type, called a .pdfConsider an extension of the queue abstract data type, called a .pdf
Consider an extension of the queue abstract data type, called a .pdf
 
Cordia Corporation is planning a 15 year project with an initial inv.pdf
Cordia Corporation is planning a 15 year project with an initial inv.pdfCordia Corporation is planning a 15 year project with an initial inv.pdf
Cordia Corporation is planning a 15 year project with an initial inv.pdf
 
Case study on Queensland Health Payroll Debacle & Queensland Governm.pdf
Case study on Queensland Health Payroll Debacle & Queensland Governm.pdfCase study on Queensland Health Payroll Debacle & Queensland Governm.pdf
Case study on Queensland Health Payroll Debacle & Queensland Governm.pdf
 
Can you give an example of a binary heap programCan you give an .pdf
Can you give an example of a binary heap programCan you give an .pdfCan you give an example of a binary heap programCan you give an .pdf
Can you give an example of a binary heap programCan you give an .pdf
 
All businesses, small or large, depend on data centers. Answer the f.pdf
All businesses, small or large, depend on data centers. Answer the f.pdfAll businesses, small or large, depend on data centers. Answer the f.pdf
All businesses, small or large, depend on data centers. Answer the f.pdf
 
A) The linearity condition is not satisfied. B) The linearity cond.pdf
A) The linearity condition is not satisfied. B) The linearity cond.pdfA) The linearity condition is not satisfied. B) The linearity cond.pdf
A) The linearity condition is not satisfied. B) The linearity cond.pdf
 
4. Records of the missions of Baja California in the form of baptism.pdf
4. Records of the missions of Baja California in the form of baptism.pdf4. Records of the missions of Baja California in the form of baptism.pdf
4. Records of the missions of Baja California in the form of baptism.pdf
 

Recently uploaded

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 

Recently uploaded (20)

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 

You are required to implement all the classes as specified by UML di.pdf

  • 1. You are required to implement all the classes as specified by UML diagram below.The objective of most of the methods is obvious from the given method name and input parameters.I am listing below the explanation of the not-so-obvious methods. PlayList Class: getSong(pos:int) :Song a method that returns the song that is located in the given position (pos). If there is no song in the given position then the method returns null getSongPosition(title:String):int a method that takes the song title as input and returns as output the position of the song in the list. If not found, the method returns -1. Song -title:String -artist: String +Song (title:String, artist:String) +gettitle ():String +getArtist ):String +tostring ) :String PlayList maxNumOfSongs:int -currentNumor Songs: int; +PlayList (maxNumOESongs:int) +getcurrentNumSongs ) :int +addsong (title:String, artist:String) :void +addsong (song:Song):void +getsong (pos:int) :Song +getsongPosition (title:String) :int User nam String - favoriteSongs: PlayList +User (name: String, favoriteSongs: PlayList) +User (name: String) +setFavoriteSongs (1ist: PlayList) :void +getFavoriteSongs) PlayList; +getsong (title:String) :Song +addsong (title:String, artist:String) :void tartistsongCount (artist:String) :int +tostring () :String Solution Please find the implementation of all the classes mentioned in the above UML diagram. Please see comment against each line to get to know the explanation :