0% found this document useful (0 votes)
17 views2 pages

cs304 Assignment No 2 Solution Fall 2019 [www.virtualstudysolutions.blogspot.com]

Uploaded by

lamhouse101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

cs304 Assignment No 2 Solution Fall 2019 [www.virtualstudysolutions.blogspot.com]

Uploaded by

lamhouse101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Cs304 assignment no 2 solution fall 2019

#include<iostream>
#include<string>
Using namespace std;

Class franchise{
private:
string name;
string city;

public:
franchise();
void setname(string);
void setcity(string);
string getname();
string getcity();
};

franchise::franchise(){

}
void franchise::setname(string n){
name = n;
}

void franchise::setcity(string c){


city = c;
}
string franchise::getname(){
return name;
}

string franchise::getcity(){
return city;
}

Class league{
private:
string naame;
string country;
int year;
franchise french;

public:

www.virtualstudysolutions.blogspot.com
league(string , int, string , string , string);
void displayinfo();
};

League::league(string n, int y, string c, string name, string city){


naame = n;
country = c;
french.setcity(city);
city = french.getcity();
year = y;
french.setname(name);
name = french.getname();
}

Void league::displayinfo(){
cout<<"league name :"<<naame<<endl;
cout<<"league year :"<<year<<endl;
cout<<"league county :"<<country<<endl;
cout<<"franchise name :"<<french.getname()<<endl;
cout<<"frenchise city :"<<french.getcity()<<endl;
}

www.virtualstudysolutions.blogspot.com

You might also like