Skip to main content
Question Protected by Doc Brown
Tweeted twitter.com/#!/StackProgrammer/status/137898387805708288
Clean up question to be less about the friends and more about the questions
Source Link
user8
user8

Differentiate What's the benefit of object-oriented programming over procedural language(c) from oop languages(c++)programming?

I have beenI'm trying to differentiate c and c++(or oop languages) but I don't understand where the difference isbetween procedural languages like C and object-oriented languages like C++.

Note I have I've never used c++C++, but I askedI've been discussing with my friends and some of themon how to differentiate c and c++the two.

They say c++I've been told C++ has oopobject-oriented concepts and also theas well as public, and private modes for definition of variables and which c: things C does not have though. Seriously I have done vb.net programming for a while 2 to 3 months, II've never faced a situationhad to use class concepts and modes of definition like public and privatethese for while developing programs in Visual Basic. So I thoughtNET: what could beare the use forbenefits of these?

My friend explained me a program sayingI've also been told that if a variable is public, it can be accessed anywhere I said why, but it's not declare it asclear how that's different from a global variable like in c? He dida language like C. It's also not get back to my question and he said ifclear how a variable is private it cannot be accessed by some other functions I said why not define it asvariable differs from a local variable, even these he was unable to answer.

No matter where I read private variables cannot be accessed whereas public variables can be then why not make public as global and private as local whats the difference? whats the real use of public and private ? please don't say it can be used by everyone, I suppose why not we use some conditions and make the calls?

I haveAnother thing I've heard people sayingis that, for security reasons, a friend said if a function needneeds to be accessed it should be inherited first.

He explained saying The use-case is that only adminan administrator should be able toonly have someas much rights and not all so that functions are made privateas they need and inherited only by the admin to use

Then I said why not we use if conditioneverything, but it seems a conditional would work as well:

   if ( login == "admin") {
    // invoke the function
}

he still didWhy is this not answer these question. Please clear me with these things, I have done vb.net and vba and little c++ without using oop concepts because I never found their real use while I was writing the code, I'mideal?

Given that there seems to be a little afraid amprocedural way to do everything object-oriented, why should I too back in oop conceptscare about object-oriented programming?

Differentiate procedural language(c) from oop languages(c++)

I have been trying to differentiate c and c++(or oop languages) but I don't understand where the difference is.

Note I have never used c++ but I asked my friends and some of them to differentiate c and c++

They say c++ has oop concepts and also the public, private modes for definition of variables and which c does not have though. Seriously I have done vb.net programming for a while 2 to 3 months, I never faced a situation to use class concepts and modes of definition like public and private. So I thought what could be the use for these?

My friend explained me a program saying that if a variable is public, it can be accessed anywhere I said why not declare it as a global variable like in c? He did not get back to my question and he said if a variable is private it cannot be accessed by some other functions I said why not define it as a local variable, even these he was unable to answer.

No matter where I read private variables cannot be accessed whereas public variables can be then why not make public as global and private as local whats the difference? whats the real use of public and private ? please don't say it can be used by everyone, I suppose why not we use some conditions and make the calls?

I have heard people saying security reasons, a friend said if a function need to be accessed it should be inherited first.

He explained saying that only admin should be able to have some rights and not all so that functions are made private and inherited only by the admin to use

Then I said why not we use if condition

   if ( login == "admin")
    invoke the function

he still did not answer these question. Please clear me with these things, I have done vb.net and vba and little c++ without using oop concepts because I never found their real use while I was writing the code, I'm a little afraid am I too back in oop concepts?

What's the benefit of object-oriented programming over procedural programming?

I'm trying to understand the difference between procedural languages like C and object-oriented languages like C++. I've never used C++, but I've been discussing with my friends on how to differentiate the two.

I've been told C++ has object-oriented concepts as well as public and private modes for definition of variables: things C does not have. I've never had to use these for while developing programs in Visual Basic.NET: what are the benefits of these?

I've also been told that if a variable is public, it can be accessed anywhere, but it's not clear how that's different from a global variable in a language like C. It's also not clear how a private variable differs from a local variable.

Another thing I've heard is that, for security reasons, if a function needs to be accessed it should be inherited first. The use-case is that an administrator should only have as much rights as they need and not everything, but it seems a conditional would work as well:

if ( login == "admin") {
    // invoke the function
}

Why is this not ideal?

Given that there seems to be a procedural way to do everything object-oriented, why should I care about object-oriented programming?

I have been trying to differentiate c and c++(or oop languages) but I dontdon't understand where the difference is.

Note I have never used c++ but I asked my friends and some of them to differentiate c and c++

They say c++ has oop concepts and also the public, private modes for definationdefinition of variables and which c does not have though.Seriously Seriously I have done vb.net programming for a while 2 to 3 months, I never faced a situation to use class concepts and modes of defination.(publicdefinition like public and private).So So I thought what could be the hell they use for these?

My friend explained me a program saying that if a variable is public  , it can be accessed anywhere I said why not declare it as a global variable like in c he? He did not get back to my question and he said if a variable is private it cannot be accessed by some other functions I said why not define it as a local variable, even these he was unable to answer.

No matter where I read private variables cannot be accessed whereas public variables can be then why not make public as global and private as local whats the difference? whats the real use of public and private ? please dontdon't say it can be used by everyone, I suppose why not we use some conditions and make the calls  ?

I have heard people saying security reasons, a friend said if a function need to be accessed it should be inherited first.

heHe explained saying that only admin should be able to have some rights and not all so that functions are made private and inherited only by the admin to use

Then iI said why not we use if condition

   if ( login == "admin")
    invoke the function

he still did not answer these question.Please Please clear me with these things, I have done vb.net and vba and little c++ without using oop concepts because I never found their real use while iI was writing the code  , ImI'm a little afraid am iI too back in oop concepts  ?

Please fix my questions Thanks .

I have been trying to differentiate c and c++(or oop languages) but I dont understand where the difference is.

Note I have never used c++ but I asked my friends and some of them to differentiate c and c++

They say c++ has oop concepts and also the public, private modes for defination of variables and which c does not have though.Seriously I have done vb.net programming for a while 2 to 3 months, I never faced a situation to use class concepts and modes of defination.(public and private).So I thought what the hell they use these

My friend explained me a program saying that if a variable is public  , it can be accessed anywhere I said why not declare it as a global variable like in c he did not get back to my question and he said if a variable is private it cannot be accessed by some other functions I said why not define it as a local variable, even these he was unable to answer.

No matter where I read private variables cannot be accessed whereas public variables can be then why not make public as global and private as local whats the difference? whats the real use of public and private ? please dont say it can be used by everyone, I suppose why not we use some conditions and make the calls  ?

I have heard people saying security reasons, a friend said if a function need to be accessed it should be inherited first.

he explained saying that only admin should be able to have some rights and not all so that functions are made private and inherited only by the admin to use

Then i said why not we use if condition

   if ( login == "admin")
    invoke the function

he still did not answer these question.Please clear me with these things, I have done vb.net and vba and little c++ without using oop concepts because I never found their real use while i was writing the code  , Im little afraid am i too back in oop concepts  ?

Please fix my questions Thanks .

I have been trying to differentiate c and c++(or oop languages) but I don't understand where the difference is.

Note I have never used c++ but I asked my friends and some of them to differentiate c and c++

They say c++ has oop concepts and also the public, private modes for definition of variables and which c does not have though. Seriously I have done vb.net programming for a while 2 to 3 months, I never faced a situation to use class concepts and modes of definition like public and private. So I thought what could be the use for these?

My friend explained me a program saying that if a variable is public, it can be accessed anywhere I said why not declare it as a global variable like in c? He did not get back to my question and he said if a variable is private it cannot be accessed by some other functions I said why not define it as a local variable, even these he was unable to answer.

No matter where I read private variables cannot be accessed whereas public variables can be then why not make public as global and private as local whats the difference? whats the real use of public and private ? please don't say it can be used by everyone, I suppose why not we use some conditions and make the calls?

I have heard people saying security reasons, a friend said if a function need to be accessed it should be inherited first.

He explained saying that only admin should be able to have some rights and not all so that functions are made private and inherited only by the admin to use

Then I said why not we use if condition

   if ( login == "admin")
    invoke the function

he still did not answer these question. Please clear me with these things, I have done vb.net and vba and little c++ without using oop concepts because I never found their real use while I was writing the code, I'm a little afraid am I too back in oop concepts?

Source Link
niko
  • 2.1k
  • 4
  • 22
  • 19

Differentiate procedural language(c) from oop languages(c++)

I have been trying to differentiate c and c++(or oop languages) but I dont understand where the difference is.

Note I have never used c++ but I asked my friends and some of them to differentiate c and c++

They say c++ has oop concepts and also the public, private modes for defination of variables and which c does not have though.Seriously I have done vb.net programming for a while 2 to 3 months, I never faced a situation to use class concepts and modes of defination.(public and private).So I thought what the hell they use these

My friend explained me a program saying that if a variable is public , it can be accessed anywhere I said why not declare it as a global variable like in c he did not get back to my question and he said if a variable is private it cannot be accessed by some other functions I said why not define it as a local variable, even these he was unable to answer.

No matter where I read private variables cannot be accessed whereas public variables can be then why not make public as global and private as local whats the difference? whats the real use of public and private ? please dont say it can be used by everyone, I suppose why not we use some conditions and make the calls ?

I have heard people saying security reasons, a friend said if a function need to be accessed it should be inherited first.

he explained saying that only admin should be able to have some rights and not all so that functions are made private and inherited only by the admin to use

Then i said why not we use if condition

   if ( login == "admin")
    invoke the function

he still did not answer these question.Please clear me with these things, I have done vb.net and vba and little c++ without using oop concepts because I never found their real use while i was writing the code , Im little afraid am i too back in oop concepts ?

Please fix my questions Thanks .