answersLogoWhite

0


Best Answer
Core PrinciplesSeparation of ConcernsA given problem that involves different kinds of concerns should be identified and separated to cope with complexity, and to achieve the required factors of robustness, adaptability, maintainability, and reusability Single Responsibility PrincipleEach responsibility should be a separate class, because each responsibility is an axis of change CohesionThe degree to which its responsibilities form a meaningful unit; higher cohesion is better Interface Segregation PrincipleThe dependency of one class to another one should depend on the smallest possible interface Dependency Inversion PrincipleThe modules that implement a high level policy should not depend on the modules that implement the low level policies, but rather, they should depend on some well-defined interfaces
User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

Object-oriented programming (OOP) is not a separate language, it is a programming principal. C++ is a programming language that supports OOP as well as procedural programming and is backwardly compatible with C, the main language from which it evolved. The OOP aspect constitutes the bulk of C++ to the extent that if you're programming in C++ then you're using OOP. If you were to actively avoid using OOP entirely then you'd be writing C-style, in which case you'd be better off using C itself since C has no OOP capability whatsoever. C++ is not 100% OOP like Java or C#, but that is not a weakness of the language. OOP is merely a programming tool and, like any other tool, you use it wherever it is appropriate to do so, just as you use C-style wherever appropriate. C++ is nothing if not flexible.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

Object-oriented programming (OOP) is one of the main reasons C++ was developed. C++ evolved from C which is an imperative (procedural) and structured programming language. This means that you can write procedural code that maps 1:1 with assembly language, as well as make use of structured language features such as loops and procedure calls. While this makes C an extremely powerful language for general purpose programming, the degree of separation between the data and the functions that operate upon that data make it difficult to produce robust, scalable solutions.

C++ addresses this problem by introducing OOP to C, which allows programmers to combine data and the methods that operate upon that data as a single entity -- an object. Objects are self-contained entities that encapsulate all the information necessary to use an object without the need to know how the object is physically implemented (the implementation is defined by the class of object). Objects can be embedded within other objects to produce highly complex object models, such that every object is responsible only for itself. New objects could be derived from existing objects to take advantage of tried and tested code that could be specialised to suit a particular purpose. The four main pillars of OOP are encapsulation, inheritance, polymorphism and abstraction. When combined with other improvements over C such as greater type safety, this makes it possible to more easily produce highly-complex programs with a high degree of robustness, whilst retaining all the advantages of the C language.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

Object-oriented programming is nothing more than a programming tool, making it easier to represent and manipulate data in a highly structured manner that is both robust and extensible, whilst reducing code maintenance.

Just as the const keyword has no actual meaning in machine code, objects have no meaning when compiled. That is, the const keyword exists purely to ensure programmers "do the right thing" (if you attempt to alter a constant, the compiler will warn you cannot and the program won't compile). But once compiled, constants are just variables. Since the programmer cannot actually write any code to manipulate a constant's value, the compiler cannot generate that code, thus ensuring the constness of the variable.

By the same token, objects exist purely to combine the data and the methods that can operate upon that data, giving a high-degree of control over which functions may or may not manipulate that data. With a well-defined class system, it should be impossible for any object to hold invalid data, and therefore impossible to write code that could invalidate the data. Thus the compiler can safely separate the data from the methods to produce entirely public C-style structs and a series of external functions (just as if you'd written the entire program in C yourself).

Of course if you'd written the program in C, you would lose all the protection that object-oriented programming provides. Thus you will be forced to ensure that every operation upon your data leaves the data in a valid state at all times, which would require a great deal more runtime checks than would otherwise be required in C++. Object-oriented programming is merely a tool, but it is an extremely powerful tool, greatly simplifying the process of manipulating your data in a highly-controllable manner, whilst producing code that is every bit as efficient as the equivalent C code, if not more so because objects provide certain guarantees that you simply do not get with C alone.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Because it allows for user defined types, and the creation of objects from those user defined types.

For example, instead of just dealing with 'int' and 'char' types, to name a couple, you can create a new type with the 'class' keyword. A class can contain member data (variables) as well as methods (functions).

A single class can contain a large number of variables and functions that all relate to each other. The programmer can then access all of those class members through a single instance (object) of the class.

In a well designed class, the user of the class will have limited access to its' members, while other members of the class remain hidden, only accessible internally.

By hiding some class members from its' users, interaction with class objects is simplified.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

With templates. You write a template function, usually with a type <t>, and then instantiate it, say with a type <string>, and it is as if you wrote the whole function using <string> instead of <t>.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Object-oriented programming (OOP) is the same regardless of the language that uses it. It is simply a means of encapsulating data and the procedures that act upon it into a single entity, known as "object". OOP supports 4 primary features: encapsulation, data hiding, inheritance and polymorphism.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

No. C++ evolved from C and therefore maintains the concept of primitive variables such as int, char and float in order to retain backward compatibility with C. In a 100% OOP language, such as Java, all primitives would be implemented as objects. C++ does provide syntactic sugar to allow primitives to be used in an object-oriented manner, but it is not strictly enforced.

C++ also maintains the concept of pointer variables. In a 100% OOP language, references would be used instead. Unlike C, C++ treats references as a separate entity to pointers (in C a reference is just another word for a pointer) but the new operator always returns a pointer.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is object oriented programming language in C plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What language is completely object oriented c plus plus or java?

Java is the complete object oriented Programming Language as every thing in java is an object,


What is the significance of c plus plus?

C++ is an object oriented programming language


Which type of language c plus plus is?

It's an imperative, procedural and Object-Oriented programming language.


Who developed the C plus plus object oriented programming language?

Bjarne Stroustroup.


What has the author Edmund W Faison written?

Edmund W. Faison has written: 'Borland C [plus plus] 4 object-oriented programming' 'Borland C++ 3 object-oriented programming' -- subject(s): Borland C++, C++ (Computer program language), Object-oriented programming (Computer science) 'BorlandC[plus plus] 4.5 object-oriented programming' -- subject(s): Borland C., C., Object-oriented programming (Computer science) 'Borland C++ 3.1 object-oriented programming' -- subject(s): Borland C++, C++ (Computer program language), Object-oriented programming (Computer science)


Why c plus plus language is called command oriented language?

C++ is not a command oriented language, it is a multi-paradigm language because it employs functional and object-oriented approaches to programming.


What is the need for c plus plus?

Primarily to add object oriented programming methods to the C language.


What actually mean by object oriented programming Is C plus plus is a object oriented programming?

Just eat a watermellon!


Difference between java and C plus plus?

java is an advanced object oriented programming language than c++


What are the two major types of programming languages in c plus plus?

Object oriented programming and structured programming.


What are the concepts of object oriented programming in c plus plus?

The concepts of OOP in C++ are the same as for OOP in any other programming language: abstraction, encapsulation, inheritance and polymorphism.


What is php plus plus?

PHP++ is an object-oriented version of the PHP programming language. ++ is used in programming to increment a variable by one so it means an improved version of PHP.