Taking the Values for Feet and Inch and Display them | OOP Programming

Enter the value for feet and inch and then display the values at screen | Taking the Values for Feet and Inch and Display them | OOP Programming

Taking the Values for Feet and Inch and Display them | OOP Programming
Taking the Values for Feet and Inch and Display them | OOP Programming 
Hi friends my name is abid and today i'm here with a new object oriented programming's program which is very basic program of OOP and you can say that this is syntax of OOP, in this post we shall construct the structure of OOP program in which we shall use private and public objects to execute the program


We use Private for hidden objects for our secret purposes and we can not directly access Private objects so we use Public objects to access and assign and show values stores in Private using Public

this all syntax is basically all is like Structures and we shall use functions to display values
Enter the value for feet and inch and then display the values at screen
Enter the value for feet and inch and then display the values at screen 



#include<iostream>
using namespace std;
class dist
{
private:
int feet;
int inch;
public:
void distance()
{
cout<<"Enter the value of feet:";
cin>>feet;
cout<<"Enter the value of inches:";
cin>>inch;
}
void display()
{
cout<<"Feets are:"<<feet<<endl;
cout<<"Inches are:"<<inch<<endl;
}
};
int main ()
{
dist d;
d.distance();
d.display();
system("pause");



COMMENTS

Name

Blogger-Templates,1,Blogging,4,C++,11,Facebook,1,Free-Premium,1,Freebies,4,Google,1,Hack-Facebook,1,Programming,11,SEO,3,Social-Media,1,Softwares,3,Widgets,1,
ltr
item
Online Blogger Tricks | A2Z Art of Blogging: Taking the Values for Feet and Inch and Display them | OOP Programming
Taking the Values for Feet and Inch and Display them | OOP Programming
Enter the value for feet and inch and then display the values at screen | Taking the Values for Feet and Inch and Display them | OOP Programming
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirOGvV4PQKbWwGkofndbvgUrpT3OoT80P_WXAGI9gm1DifSE8We6HE7D5NOATMn5avCEdsee-JYNmOgKVOmaxaboIKntNI_uE2q6h1zyWykjCUU3XlQ7nnh7OqPSafxw_tdzLzLe6gtWg/s640/newproject_2_original.jpg
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirOGvV4PQKbWwGkofndbvgUrpT3OoT80P_WXAGI9gm1DifSE8We6HE7D5NOATMn5avCEdsee-JYNmOgKVOmaxaboIKntNI_uE2q6h1zyWykjCUU3XlQ7nnh7OqPSafxw_tdzLzLe6gtWg/s72-c/newproject_2_original.jpg
Online Blogger Tricks | A2Z Art of Blogging
https://a4abidaziz.blogspot.com/2016/10/taking-values-and-displaying.html
https://a4abidaziz.blogspot.com/
http://a4abidaziz.blogspot.com/
http://a4abidaziz.blogspot.com/2016/10/taking-values-and-displaying.html
true
1578912806520322323
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy