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: 1515

.

+ 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

ρяιηcε replied to + M.Tariq Malik's discussion MGT301 GDB Fall 2019 Solution & Discussion in the group MGT301 Principles of Marketing
2 minutes ago
Profile Iconρяιηcε and Alisha Noor joined + M.Tariq Malik's group
2 minutes ago
+ ! ! Şĩɳℊℯℛ ⋆⭐️⋆ replied to +! ! ❝A̳n̳o̳n̳y̳m̳o̳u̳s̳❞ ! !+'s discussion HapPy BiRtHdaY To.. Hopuuuuuuuuuu :-* <3
4 minutes ago
Amir sohail commented on + M.Tariq Malik's group STA630 Research Methods
20 minutes ago
Amir sohail joined + M.Tariq Malik's group
21 minutes ago
Anu Malik mcs3 liked +! ! ❝A̳n̳o̳n̳y̳m̳o̳u̳s̳❞ ! !+'s discussion HapPy BiRtHdaY To.. Hopuuuuuuuuuu :-* <3
24 minutes ago
Profile IconSarmad Ali, Saddi, Muhammad Hassan Akbar and 9 more joined Virtual University of Pakistan
33 minutes ago
Rome replied to +! ! ❝A̳n̳o̳n̳y̳m̳o̳u̳s̳❞ ! !+'s discussion HapPy BiRtHdaY To.. Hopuuuuuuuuuu :-* <3
34 minutes ago
+ ! ! ! ❣ Sanam ❣ !+ replied to +! ! ❝A̳n̳o̳n̳y̳m̳o̳u̳s̳❞ ! !+'s discussion HapPy BiRtHdaY To.. Hopuuuuuuuuuu :-* <3
1 hour ago
+! ! ❝A̳n̳o̳n̳y̳m̳o̳u̳s̳❞ ! !+ replied to +! ! ❝A̳n̳o̳n̳y̳m̳o̳u̳s̳❞ ! !+'s discussion HapPy BiRtHdaY To.. Hopuuuuuuuuuu :-* <3
1 hour ago
+ " Нσρε" replied to +! ! ❝A̳n̳o̳n̳y̳m̳o̳u̳s̳❞ ! !+'s discussion HapPy BiRtHdaY To.. Hopuuuuuuuuuu :-* <3
1 hour ago
Muhammad Sarfraz added a discussion to the group MGT601 SME Management
1 hour ago

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

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

.