We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

CS304 Object Oriented Programming Assignment No 02 Fall 2019 Solution & Discussion

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 1519

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

Students having same subject can start discussion here to solve assignment, GDB & Quiz and can clear their concepts until solution is provided. 

 

P.S:    Please always try to add the discussion in proper format title like “CS101 Assignment / GDB No 01 Solution & Discussion Due Date: ___________”

Then copy Questions from assignment file and paste in Discussion.

 

http://bit.ly/vucodes (For Assignments, GDBs & Online Quizzes Solution)

http://bit.ly/papersvu (For Past Papers, Solved MCQs, Short Notes & More)

Click Here to Search (Looking For something at vustudents.ning.com?)

Click Here to Join (Our facebook study Group)

CS304 Object Oriented Programming Assignment 2 Solution & Discussion Fall 2019


 

Assignment No. 02
Semester: Fall 2019

CS304- Object Oriented Programming  

Total Marks: 20

Due Date: 28/11/2019

Uploading instructions:

  • Your assignment should be in .CPP format (Any other formats like scan images, PDF, zip, doc, rar and bmp etc. will not be accepted).
  • Save your assignment with your ID (e.g. bc000000000.CPP).
  • No assignment will be accepted through email.

 

Rules for Marking:

It should be clear that your assignment will not get any credit if:

·       The assignment is submitted after due date.

·       The submitted assignment does not open, execute or file is corrupted.

·       Your assignment is copied from internet, handouts or from any other student.

      (Strict disciplinary action will be taken in this case).

 

Lectures Covered:

This assignment covers Lecture # 7-15.

Assignment

 

Consider the following part of class diagram which is showing composition relationship between League and Franchise classes.

 

Tasks to do:

You are required to write C++ code to create Franchise and League classes. Your classes should contain data members, constructors and member functions according to the given diagram. You also need to implement composition relationship between these classes.

 

Your output should be same as sample output.

 

Sample Output:

                                                                            

                                                                              

 

 

Best of luck!

NOTE:  Do not put any query on MDB about this assignment, if you have any query then email at cs304@vu.edu.pk.  Furthermore, if any student found cheating from any other student or from online forums then he/she will be awarded ZERO right away and strict disciplinary action will be taken against the student.

Deadline: Your assignment must be uploaded/submitted on or before 28th November 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 :"naameendl;
cout"League Year :"yearendl;
cout"League County :"countryendl;
cout"Franchise name :"french.getName()endl;
cout"Frenchise City :"french.getCity()endl;
}

i have an issue when i copiled it says source file not compiled 

CS-304 || 2nd Assignment || Solution ||Fall 2019||

AssalamoAlaikum
yeh solution to error day raha ha

kia error daita hay ?

source file not complied 

function ka koi masla ha

#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:"naameendl;
cout"League Year:"yearendl;
cout"League County :"countryendl;
cout"Franchise name:"french.getName()endl;
cout"Frenchise City:"french.getCity()endl;
}

int main(){

league l("PSL",2020,"Pakistan","Sargodha Eagles","Sargodha");
l.displayInfo();

}

RSS

Latest Activity

+ M.Tariq Malik replied to Asad farooq's discussion EDU433 Professionalism in Teaching Assignment No 02 Fall 2019 Solution & Discussion Due Date: 27-01-2020 in the group EDU433 Professionalism in Teaching
3 minutes ago
+ M.Tariq Malik liked Asad farooq's discussion EDU433 Professionalism in Teaching Assignment No 02 Fall 2019 Solution & Discussion Due Date: 27-01-2020
5 minutes ago
+ ! ❤SΕNSΙТΙVΕ(∂ΕSΕЯТ ΡЯΙNCΕSS)❤ replied to +¢αяєℓєѕѕ gιяℓ's discussion ابھی اس لمحے کو گزارنا سیکھنا ہے
7 minutes ago
Muhammad Ishtiaq liked + M.Tariq Malik's group MTH405 Elementary Topics in Pure Mathematics
10 minutes ago
+ ! ❤SΕNSΙТΙVΕ(∂ΕSΕЯТ ΡЯΙNCΕSS)❤ liked +¢αяєℓєѕѕ gιяℓ's discussion ابھی اس لمحے کو گزارنا سیکھنا ہے
10 minutes ago
+ M.Tariq Malik replied to Zainsha malik's discussion MTH303 assignment no 2 in the group MTH303 Mathematical Methods
11 minutes ago
+ M.Tariq Malik liked Zainsha malik's discussion MTH303 assignment no 2
11 minutes ago
+ ! ! cuttiee ! ! + and + ! ! ! ! Mano ! ! ! + are now friends
16 minutes ago
+ ! poison liked +¢αяєℓєѕѕ gιяℓ's discussion Maa Sadkay
17 minutes ago
+ ! poison liked +¢αяєℓєѕѕ gιяℓ's discussion ابھی اس لمحے کو گزارنا سیکھنا ہے
17 minutes ago
+ ! poison liked Mani Siddiqui BS VIII's discussion Give Me Solution....
17 minutes ago
+ ! poison liked Tayyba Rajpoot's discussion Eng 201 past papers
17 minutes ago

Today Top Members 

© 2020   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.