Program is to find the area of room, C/C++ Programming

Assignment Help:

Program is to find the area of room:

Program is to find the area of room with default values using classes & object

class room

  {

  private:

    int len;

    int wid;

    int hei;

  public:

       int ar;

  // function definitions

     void assign()

       {

      len=20;

      wid=30;

      hei=40;

       }

    void area()

     {

    ar=2*(len*wid+wid*hei+hei*len);

     }

 

    void disp()

       {

    cout<<" length "<

    cout<<" breadth "<

    cout<<" height "<

    cout<<" area "<

       }

  };

 

 void main()

   {

   clrscr();

   room area1;

   area1.assign();

   area1.area();

   area1.disp();

   }


Related Discussions:- Program is to find the area of room

Explain the special pointer this, The Special Pointer 'this' When vario...

The Special Pointer 'this' When various instances of a class come into existence, it naturally follows that each instance has its own copy of member variables. If this were not

C help, Need help with C network program

Need help with C network program

Loop, wap to count the numof string present in a word

wap to count the numof string present in a word

What is function overloading, Question 1 What is function overloading? Wri...

Question 1 What is function overloading? Write a c++ program to implement a function overloaded Question 2 Explain about the constructors and Destructors with suitable exampl

C programs, accept principal amount,rate of interest, & duration from the u...

accept principal amount,rate of interest, & duration from the user. display interest amount and total amount

When should you use multiple inheritance, There are 3 acceptable answers: "...

There are 3 acceptable answers: "Never," "Rarely "and" When the problem domain cannot be accurately modelled any other way."

Structure of cpp program, Structure of C++ Program: Chronological orde...

Structure of C++ Program: Chronological order of C++ program. 1.   Class declaration 2.   Main function program 3.   Member functions definitions 4.   Include heade

Struct items, how to make a program this struct items/product

how to make a program this struct items/product

What is the difference between structure and class, What is the difference ...

What is the difference between structure and class? - Members of structures are public while those of a class are private. - Classes provide data hiding while structures don

Minimum shelves, Write a program that finds the minimum total number of she...

Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd