Friday , 22 November 2024

CS304 Assignments # 1 Solution Spring 2012

 Assignment:

In this course we are going to develop a “Song Library”, in which we have different types of songs from various artists ofPakistan. This application is accessed by two types of users:

1-Listener

2- Administrator

Listeners are the simple user with limited rights while on the other hand administrator has full rights. Listener can only play songs of different artists from different music categories. Administrator can play songs as well as make changes in library. They can add, delete, and update music items in various categories.  User will access Music Items of the application to play songs.

Music Items contains four types of music categories which are listed below:

1-      Folk Music

2-      Film Music

3-      POP Music

4-      Classic Music

Each of these categories has albums of various artist of Pakistan. These artists can be categories as Individual/solo artist or may be a musical group or band. Each album contains number of songs.

The tasks you have to do are:

  1. You have to identify the main entities (objects) for this system.
  2. You have to find out the relationships between these objects.

  3. You will have to find the necessary attributes and functions that need to be associated with each object to implement the functionality mentioned above.
  4. You will make a final comprehensive diagram showing all objects and their relations along with their attributes and functions.

Note: Use all concepts you have studied so far like abstraction, encapsulation, and inheritance and sub typing, Information Hiding and Polymorphism wherever applicable. You can use any tool for drawing like MS Office or Visio.

Important things to consider:  

  1. As happens in real world that everyone visualize a problem in different way so the solutions of all students should be according to their own thinking not taken from some source.
  2. As this is preliminary phase of our system so it is recommended that you identify as much objects and their relationships as you can some of them may be eliminated in next assignments.

Example:

A snapshot of final object model from the solution of previous semester first assignment is shown below, (you need not to worry about data types at this moment) 

Example Object Model for Learning Management System

/****************** Assignment No. 1 : Solution **********************\

Objects/ Classes Attributes Methods
User IDName playTrack()getName()getID()
Listener IDName playTrack()
Administrator IDNamePassword

 

 

getPassword()addTrack()deleteTrack()

updateTrack()

addArtist()

deleteArtist()

updateArtist()

addAlbum()

deleteAlbum()

updateAlbum()

addMusicCategory()

deleteMusicCategory()

updateMusicCategory()

Song Library System UserMusicItem getUser()getMusicItem()
Music Items MusicCategory getMusicCategory()getAlbum()getArtist()

getTrack()

getBand()

Album AlnumIDAlbumTitleTrackNumber

Year


Track

getTrack()vewTrack()vewTracknumber()

viewYear()

getAlbumID()

getTitle()

Track TrackNameTrackIDLyrics playTrack()stopTrack()pauseTrack()

downloadTrack()

getTrackName()

getTrackID()

getLyrics()

Artist ArtistNameAlbumsTracks

 

getTrack()getAlbum()getArtistName()

getMusicCategory()

Band ArtistBandNameBandDetails getArtist()getBandDetails()getBandName()
MusicCategory ArtistBand getAlbum()getTrack()getArtist()
Folk Music ArtistBand getBand()getArtist()
Film Music ArtistBand getBand()getArtist()
POP Music ArtistBand getBand()getArtist()
Classic Music ArtistBand getBand()getArtist()

Object model of Song Library System

Figure 1-Object Model of Song Library System

/****************** Download Solution From Here **********************\

 

Spring 2012_CS304_1_SOL

Check Also

CS304 Unsolved Final Term Paper Spring 2010

Question No: 1    ( Marks: 1 )    – Please choose one  Classes like TwoDimensionalShape and …

Leave a Reply

Your email address will not be published. Required fields are marked *

*