We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

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 Assignment No 03 Fall 2019 Solution & Discussion


+ 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)


Views: 731

Replies to This Discussion

Cs 304 assignment Solution
#include <iostream>
#include <string>
using namespace std;
class Player{
private:
string name;
string code;
int Age;
public:
Player()
{
//………….
}
void setname()
{
cout"\nEnter Name: ";
cin>>name;
}
void setcode()
{
cout" Enter PlayerCode: ";
cin>> code;
}
void setAge()
{
cout" Enter Age: ";
cin>> Age;
}
string getname()
{
return name;
}
string getcode()
{
return code;
}
int getAge()
{
return Age;
}
void display()
{
// Display function for Player Class….
}
};
class Batsman:public Player{
private:
int Inning;
int Scored;
double B_Average;
public:
Batsman()
{
//………….
}
void setInning()
{
cout"Enter Inning: ";
cin>>Inning;
}
void setScored()
{
cout"Enter Runs: ";
cin>>Scored;
}
double cal_Average()
{
return B_Average = Scored/Inning;
}
virtual void display()
{
cout"\nDisplaying Batsman Information:\n..........................\n";
cout"Batsman name: "getname()endl;
cout"Batsman code: "getcode()endl;
cout"Batsman age: "getAge()endl;
cout"Batsman Average: "cal_Average()endl;
}
};
class Bowler:public Player{
private:
int Run, Over;
double L_Average;
public:
Bowler()
{
//.......
}
void setRun()
{
cout"Enter Runs Conceded: ";
cin>>Run;
}
void setOver()
{
cout"Enter Total Overs: ";
cin>>Over;
}
double cal_Average()
{
return L_Average = Run/Over;
}
virtual void display()
{
cout"\nDisplaying Bowler information:\n..........................";
cout"Bowler name: "getname()endl;
cout"Bowler code: "getcode()endl;
cout"Bowler age: "getAge()endl;
cout"Bowler Average: "cal_Average()endl;
}
};

int main()
{
int size, i;
char arr[size], check;
Batsman batsman;
Bowler bowler;

cout" How many Bowlers and Batsman data you want to enter? ";
cin>>size;

while(i<size)
{
cout"\nEnter choi

RSS

Latest Activity

+M.Tariq Malik replied to Waseem Aziz's discussion GDB MGT101 - Financial Accounting Friday, November 27, 2020 in the group MGT101 Financial Accounting
8 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS304 Assignment 01 Fall 2020 Solution / Discussion in the group CS304 Object Oriented Programming
11 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS302 Assignment 01 Fall 2020 Solution / Discussion in the group CS302 Digital Logic Design
20 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS507 Assignment No 01 Fall 2020 Solution & Discussion Due Date: 25-11-2020 in the group CS507 Information Systems
23 minutes ago
Nouman Butt liked + " J i y a " ♥'s discussion Agr............
27 minutes ago
Nouman Butt liked 彡JK彡 ❤️'s discussion **I've loved, I've lost But I've never changed** @KAMBO
27 minutes ago
Profile IconMinhaas, Zee Meer, Ubaid ullah and 21 more joined Virtual University of Pakistan
40 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS201 Assignment 01 Fall 2020 Solution / Discussion in the group CS201 Introduction to Programming
41 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS201 Assignment 01 Fall 2020 Solution / Discussion in the group CS201 Introduction to Programming
41 minutes ago
Muhammad Bilal replied to Hassan's discussion *** نیند چبھنے لگی ہے آنکھوں میں***
46 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion FIN611 GDB No 1 Fall 2020 Solution / Discussion in the group FIN611 Advanced Financial Accounting
55 minutes ago
+M.Tariq Malik liked +M.Tariq Malik's discussion FIN611 GDB No 1 Fall 2020 Solution / Discussion
55 minutes ago

Today Top Members 

Looking For Something? Search Here

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

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

.