Object Oriented Programming
Write a C++ program that applies inheritance and polymorphism to implement the source code, draw UML diagrams based on the description of the following request.
There will be a music application which has all the basic features like playing music, store music into playlists and display music lyrics. To get data about songs, we will subscribe to get from the source of today's reputable music sites. Music sites allows users to get information about song title, lyric, artist name, music genre, year of composition and current listeners on that music page. In order to ensure the interests of singers, in recent years, the singers cooperated to sign exclusive contracts to release new music only on certain music sites, including the copyright to enhance the value of music products. Therefore, the song when retrieved is classified includes popular songs and copyrighted songs. The song is copyrighted next to the information provided by the music site, also learn more about the value of copyright, which requires anyone who listens to the music to pay the corresponding amount stated in the copyright value. In addition, music sites also provides more information about music genres with 3 corresponding genres: Vietnamese music, European music and Korean music. The system will have a list to manage all the current songs, allowing to import and export song information via console, and display top 5 song charts based on respective listeners.
For the ease of management and personalization, we will build an additional account system to manage music and to solve problems related to payment and profit. The system will allow users to login to the account through username and password. Password must be at least 8 characters and must not contain space characters. If we have not had an account, user can choose between a basic account or a vip account. A vip account is when we listen to a copyrighted music, we will have a discount of 50% the amount of copyright value, and at the same time when registering allows users to choose the maintenance period (in months) and there is a maintenance fee for each month. In the meantime, vip account also has the function of suggesting the song with the most views based on the type of music the user requested. When due, the vip account requires the user to renew, the system will support the renewal by entering the corresponding renewal amount and calculating the renewal time based on the amount entered and the maintenance fee.
Users when using an account can store the songs they want to listen to into a playlist. The system needs supporting adding and deleting songs from the playlist, and the developer can both import and export the information of the songs and the playlist to the corresponding console screen.