Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS304 Assignment No. 3 Spring June 2012 idea solution
#1
Solution

/* CRRETE LISTENER CLASS ON YOUR OWN
AND MAKE CHANGES ACCORDING TO THE REQUIRMENT*/

#include
#include
using namespace std;

//Topic class
class user{
// Data members of Topic class
int ID;
char * Naam;

//Public interface of topic class
public:
//Default constructor
user(){
ID=1;
Naam=NULL;
}
//parametrized constructor
user(int id, char *naam){
ID=id;
Naam=new char[strlen(naam)+1];
strcpy(Naam,naam);
}
//setter function for ID
void setId() {
int id;
cout<<"\nEnter ID: ";
cin>>id;
}

void setNaam() {
char pChar[50];
cout<<<"\nenter naam:="" "; cin.getline(pChar,50);
Naam=new char[strlen(pChar)+1];
strcpy(Naam,pChar);
} <<"\nenter>

int getId(){
return ID;
}

char * getNaam(){
return Naam;
}

void trackplay()
{
cout<<"\nplay track\n";

}

~user(){

}
};

class admin: public user
{
char pass;
public:
void setpass()
{
cout<<"enter password";
cin>>pass;
}

void trackadd()
{
cout<<“\nadd track\n”;
}

void trackdel()
{
cout<<“delete track”<
}

void trackup()
{
cout<<“update track\n”;
}

void artistadd()
{
cout<<“add artist\n”;
}

void artistdel()
{
cout<<“del artsit\n”;
}

void albumadd()
{
cout<<“add album\n”;
}

void albumdel()
{
cout<<“album delete\n”;
}

void albumup()
{
cout<<“update album\n”;
}

void addmc()
{
cout<<“add mc\n”;
}

void delmc()
{
cout<<“del mc\n”;
}

void upmc()
{
cout<<“up mc\n”;
}

~admin()
{}

};

main()
{
user uo;
uo.setId();
uo.setNaam();
uo.trackplay();

admin ao;
ao.setpass();
ao.trackadd();
ao.trackdel();
ao.trackup();
ao.artistadd();
ao.artistdel();
ao.albumadd();
ao.albumdel();
ao.albumup();
ao.addmc();
ao.delmc();
ao.upmc();

system(“pause”);
}

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CS301 Assignment # 4 Due Date: 02-Feb-2016 Vuhelper 0 2,323 02-03-2016, 05:38 PM
Last Post: Vuhelper
  CS703 – Advanced Operating Systems Assignment No.3 solution January 2016 Vuhelper 0 5,910 01-23-2016, 09:58 PM
Last Post: Vuhelper
  CS601 Data Communication Assignment No. 03 Solution 23rd January 2016 Vuhelper 1 1,929 01-23-2016, 06:09 PM
Last Post: Vuhelper
  CS403 Assignment No. 03 Solution 23rd January 2016 Vuhelper 2 1,166 01-23-2016, 03:18 PM
Last Post: Vuhelper
  CS506 Web Design and Development Assignment no 3 Solution 3rd January 2016 Vuhelper 0 2,243 01-23-2016, 03:16 PM
Last Post: Vuhelper
  CS724 Software Process Improvement Assignment No 01 Solution 20th January 2016 Vuhelper 0 1,969 01-20-2016, 06:26 PM
Last Post: Vuhelper
  CS711 Software Design Assignment No 01 Solution Due Date Feb 12, 2016 Vuhelper 0 1,666 01-20-2016, 06:24 PM
Last Post: Vuhelper
  CS709 Formal Methods for Software Engineering Assignment No 01 Solution January 2016 Vuhelper 0 1,803 01-20-2016, 06:22 PM
Last Post: Vuhelper
  cs703 assignment no 3 Solution 20th January 2016 Vuhelper 0 1,702 01-20-2016, 06:20 PM
Last Post: Vuhelper
  CS704 Assignment No. 01 Solution January 2016 Vuhelper 0 4,800 01-20-2016, 06:19 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)