Object of Chair Containing Attributes and Behaviors

Object of Chair Containing Attributes and Behaviors:

A simple object in C++ Programming using classes containing attributes and behaviors. Attributes are declared in private variables and behaviors are declared in user defined functions in public inside the class of chair

Code of the object of Chair:

#include<iostream>
#include<string>
using namespace std;
class chair{
 //attributes
 string c_name;
 string colour;
 //behaviour
 public:
  void inputdetail(){
   cin>>c_name;
   cin>>colour;
   
  }
  void displaydetail(){
   cout<<c_name<<" "<<colour<<" "<<endl;
   
  }
};

.................................................To get the full code see at the end of the article.
Object of Chair Containing Attributes and Behaviors

Download:

To download this code click on the given link below:

Comments

Popular posts from this blog

How to Run Assembly Language Programming Code In Visual Studio 2019

How to Display Table of any Number in Assembly Language

How to Display Character in Assembly language