Cs304 Assisgnment 2 Idea SOLUTION Fall 2019

Cs304 Assisgnment 2 Idea 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:

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;

}

You May Also Like

One thought on “Cs304 Assisgnment 2 Idea SOLUTION Fall 2019

Leave a Reply

%d bloggers like this: