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

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

## Latest Activity

Muhammad Faizan Alam added a discussion to the group MCM301 Communication skills

### MCM301 ASSIGNMENT NO.2 | SPRING 2021 | MARKS: 15 | Due Date: 10 - August - 2021

25 minutes ago
Abia Fatima replied to BBA(6th smes)'s discussion assignment 1 spring 2021 in the group MGT402 Cost & Management Accounting
25 minutes ago
Abia Fatima joined + M.Tariq Malik's group

### MGT402 Cost & Management Accounting

25 minutes ago
Muhammad Faizan Alam and Hina Altaf are now friends
26 minutes ago
Ajeeha is now friends with + Ḱẚảḿḯ and shahzad malik
43 minutes ago
+ ! ! ! @ Anaya @ ! ! ! + updated their profile
1 hour ago
Razi added a discussion to the group CS311 Introduction to Web Services Development

### CS311 Assignment No 3 Spring 2021

2 hours ago
Angle, Maryum, ghulam and 1 more joined Virtual University of Pakistan
2 hours ago