On Thu, Nov 29, 2012 at 8:35 PM, Dream Queen <sangumriaz007@gmail.com> wrote:
cs304 2nd assingment idea solution 29-11-12 NOV 2012cs304 idea solution >>>>>>>>>>>>>>>>
#include <iostream.h>
#include <string.h>
#include <stdlib.h>
using namespace std;
class User;
class Band;
class Track;
class Album;
class Artist;
class Listener;
class POP_Music;
class Film_Music;
class Folk_Music;
class Classic_Music;
class MusicItems;
class MusicCategory;
class Administrator;
class SongLibrarySystem;
class User //User class prototype
{
private:
int ID;
string Name;
public:
void playTrack();
void getName();
void getID();
};
class Listener:User //Listener class prototype and its relation with base class User, here Listener is child class
{
public:
void playTrack();
};
class Administrator:User //Administrator class prototype and its relation with base class User, here Listener is child class
{
private:
string Password;
public:
void getPassword();
bool addTrack();
bool deleteTrack();
bool updateTrack();
bool addArtist();
bool deleteArtist();
bool updateArtist();
bool addAlbum();
bool deleteAlbum();
bool updateAlbum();
bool addMusicCategory();
bool deleteMusicCategory();
bool updateMusicCategory();
};
class SongLibrarySystem //SongLibrarySystem class prototype which have aggregation relationship with User and Music Items
{
private:
User *user;
MusicItems *musicitem;
public:
void getUser();
void getMusicItem();
};
class MusicCategory //MusicCategory class prototype which have composition relationship with Music Items Also have four child classes as well along with aggregation relation with Band and Artist
{
private:
Artist *artist;
Band *band;
public:
void getAlbum();
void getTrack();
void getArtist();
};
class MusicItems //MusicItems class prototype which have aggregation relationship with Song Library System
{
private:
MusicCategory musiccategory;
public:
void getMusicCategory();
void getAlbum();
void getArtist();
void getTrack();
void getBand();
};
class Folk_Music:MusicCategory // Folk_Music class prototype which is inherited from MusicCategory
{
public:
void getBand();
void getArtist();
};
class Film_Music: MusicCategory //Film_Music class prototype which is inherited from MusicCategory
{
public:
void getBand();
void getArtist();
};
class POP_Music: MusicCategory //POP_Music class prototype which is inherited from MusicCategory
{
public:
void getBand();
void getArtist();
};
class Classic_Music: MusicCategory //Classic_Music class prototype which is inherited from MusicCategory
{
public:
void getBand();
void getArtist();
};
class Track //Track class prototype which have composition relation with Artist and Album
{
private:
string TrackName;
int TrackId;
string Lyrics;
public:
void playTrack();
void stopTrack();
void pauseTrack();
void downloadTrack();
void getTrackName();
void getTrackID();
void getLyrics();
};
class Album //Album class prototype which have composition relation with Artist
{
private:
int AlnumID;
string AlbumTitle;
int TrackNumber;
int Year;
Track track;
public:
void getTrack();
void vewTrack();
void vewTracknumber();
void viewYear();
void getAlbumID();
void getTitle();
};
class Artist //Artist class prototype which have aggregation relation with Music Category
{
private:
string ArtistName;
Album Albums;
Track Tracks;
public:
void getTrack();
void getAlbum();
void getArtistName();
void getMusicCategory();
};
class Band //Band class prototype which have aggregation relation with Music Category and composition relationship with Artist
{
private:
Artist art;
string BandName;
string BandDetails;
public:
void getArtist();
void getBandDetails();
void getBandName();
};
main ()
{
cout<<"This is just a prototype of all classes";
cout<<endl;
system("PAUSE");
}
solution idea only
#Include<iostream.h>
main(void)
{
class PropertyPortal
{
private:
int NoOfUsers;
char *UAN;
char *Name;
public:
void setNoOfUser(int No); // setting the day
void setUAN(char Uan); // setting the month
void setName(char Name); // setting the year
int getNoOfUser(); // getting the value of day
int getUAN(); // getting the value of month
int getName(); // getting the value of year
int getPropertyInfo();
// Constructors of the class
PropertyPortal();
PropertyPortal (int, char);
PropertyPortal(int, char, char);
// Destructor of the class
~PropertyPortal ();
// hidden part of the class
void setNoOfUser(int i)
{
NoOfUsers=i;
}
void setUAN(char i)
{
}
PropertyPortal()
{
NoOfUsers=0;
UAN=NULL;
Name=NULL;
}
PropertyPortal (int No, char* Uan)
{
NoOfUsers=No;
UAN=Uan
Name=VU-Real-Estate;
}
PropertyPortal(int No, char* Uan, char* Name)
{
NoOfUsers=No;
UAN=Uan
Name=Name;
}
void setNoOfUser(int i)
void setUAN(char i); // setting the month
void setName(char i); // setting the year
int getNoOfUser(); // getting the value of day
int getUAN(); // getting the value of month
int getName(); // getting the value of year
int getPropertyInfo();
};
class PropertyType
{
private:
char *City;
public:
void setCity(char a); // setting the City
int getCity(char a);//get the city
void GetPropertyType();
PropertyType();
PropertyType(char);
~PropertyType();
PropertyType()
{
city=NULL;
}
PropertyType(char* acity)
{
City=acity
}
};
class Commercial:public PropertyType
{
private:
int PropertyValue;
public:
void GetPlot();
void setPropertyValue();
int getPropertyValue();
Commercial();
Commercial(char);
~Commercial();
};
class Residential:public PropertyType
{
private:
int PropertyValue;
public:
void GetPropertyCatagory();
void setPropertyCatagory();
Residential();
Residential(int);
~Residential();
};
}
--Please Join us foriDea solutions of Assignments.Solutions On Demand.Please Join our google group ""cybarien-network@googlegroups.com"
Join our page on facebook, group on facebook
and channel on you tube for latest tutorials and other stuffs.
https://www.facebook.com/vucybariens
https://www.youtube.com/user/CYBARIENNETWORK
http://www.facebook.com/groups/vufanz/
--
You received this message because you are subscribed to the Google
Groups "-VU-ROCKS-" group.
To post to this group, send email to VU-ROCKS@googlegroups.com
http://groups.google.com/group/VU-ROCKS?hl=en
--
For Virtual University of Pakistan Study Material Sharing, Discussion, etc, Come and join us at http://4e542a34.linkbucks.com
You received this message because you are subscribed to the Google
Groups "Virtual Position" group.
To post to this group, send email to http://ca13054d.tinylinks.co
For more options, visit this group at
http://004bbb67.any.gs
No comments:
Post a Comment
Note: only a member of this blog may post a comment.