Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

Dear students please discuss here about the solution of CS304 ( Object Oriented Programming ) assignment #2.

Views: 10847

Attachments:

Replies to This Discussion

Good 

This video is good.... but this is related to 1st assignment, not for the 2nd once! Kindly help in 2nd assignment.

solution of this assignment . . ..... .

Dear student please do a bit struggle yourself. It's your assignment try to do something yourself.

output kia dana hay open ni ho raha  

salam brother ya lec khud build kia ha ???i m listening this u have any data strucutre practicle implementation lec 

yaar ye to open hi nahi hor rahi chale gi kese ?

Bhai code ke file share kardo khali output file hai ye to.

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions.

 Exactly :) 

koe mujy smjy ga k is assignment mae karna kaya hai

for practice of inheritance 
#include
<iostream>
using namespace std;
// Base class Shape
class Shape {
public:
void setWidth(int w)
{
width
= w;
}
void setHeight(int h)
{
height
= h;
}
protected:
int width;
int height; };
// Base class PaintCost
class PaintCost {
public:
int getCost(int area)
{
return area * 70;
}
};
// Derived class
class Rectangle: public Shape, public PaintCost {
public:
int getArea() {
return (width * height);
}
};
int main(void) { Rectangle Rect;
int area;
Rect.setWidth(5);
Rect.setHeight(7);
area
= Rect.getArea();
// Print the area of the object.
cout
"Total area: " Rect.getArea() endl;
// Print the total cost of painting
cout
"Total paint cost: $" Rect.getCost(area) endl;
return 0; }
 

RSS

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

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