www.vustudents.ning.com

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

# CS304 Assignment #2 Solution

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

Views: 10834

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.

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; }`
` `

1

2

3

4

5

## VIP Member Badge & Others

How to Get This Badge at Your Profile DP

------------------------------------

Management: Admins ::: Moderators

Other Awards Badges List

## Latest Activity

Sufyan Butt updated their profile
1 hour ago
2 hours ago
Asad waqas added a discussion to the group PSY101 Introduction to Psychology

### PSY101 GDB 1 Solution Spring 2021 || psy101 gdb solution 1 || 100% Correct Solution

2 hours ago
2 hours ago
Mr. Khan! liked ＋ ꜞꜞ STrAnGEr ꜞꜞ ＋'s discussion مرحلے شوق کے دشوار ہوا کرتے ہیں
2 hours ago
Mr. Khan! liked Mani Siddiqui's discussion Create your Final term datasheet
2 hours ago
Mr. Khan! liked Laila kabeer's discussion Waqt badly ga tu.....
2 hours ago
Mr. Khan! liked иαвєєℓ αнмє∂'s discussion !!!!!!!!!! ONLINE EXAM !!!!!!!!!!
2 hours ago