answersLogoWhite

0

The main drawback to structured programming is that the data and the methods that operate upon that data are completely separate. This means that any code with access to the data can modify that data. In and of itself that is not a major problem, but it places the onus upon the programmer to ensure that all data is modified in a consistent and highly predictable manner, which may require additional verifications and assurances within the code to ensure that is always the case. For instance, if a variable must have a limited range of 0 to 100, then the programmer may be forced to ensure that is the case before he can use the data, and may need to perform that same check every time the data is used.

Object oriented programming combines the data and the methods that operate upon that data into a single entity, presenting the data to the outside world in a more abstract form, limiting its exposure and protecting its integrity. Mutators that modify the internal data act as gatekeepers, assuring that any and all modifications to the data are consistent. The programmer no longer needs to continually check the state of the data before using the data, as the onus is now upon the object to ensure that data integrity is maintained at all times.

By delegating the workload to the objects themselves, highly-complex data models can be created simply by embedding objects within objects, where each individual object is solely responsible for its own data integrity. The programmer can then manipulate these highly complex structures as a single entity, rather than through a series of separate functions and data that could very easily be corrupted by a single errant statement that would be difficult to trace.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What Example of structured programming?

C is a structured programming language. PHP, COBOL is also a structured programming language. These languages follow a top down approach.


A programming language that encourages structured programming?

C++ (or any other C language) encourages structured programming. I'm not sure if you are asking for an 'object oriented language' rather than structured. If that's the case, any C language or Java would fit the description perfectly.


What is the comparative between Objective Oriented Programming Language and Structured Programming Language?

what is triple jump test?


What type of language c?

It is a structured, procedural, high level programming language.


What has the author Wade Ellis written?

Wade Ellis has written: 'Structured programming using Turbo BASIC' -- subject(s): BASIC (Computer program language), Structured programming, Turbo BASIC (Computer file) 'Structured programming using True BASIC' -- subject(s): Structured programming, True BASIC (Computer program language)


What language was developed by worth for teaching structured programming in universities?

java


What is pascal in computing?

a high-level structured computer programming language used for teaching and general programming.


What are the differences between structured English and pseudo code?

Structured English is a subset of English language used to represent program logic in a clear and structured manner, while pseudo code is a high-level description of an algorithm that uses a mixture of natural language and programming language syntax. Pseudo code is closer to actual programming language syntax compared to structured English, which is more focused on readability and understanding by non-programmers.


What has the author Carl Feingold written?

Carl Feingold has written: 'Fundamentals of COBOL programming' -- subject(s): COBOL (Computer program language) 'RPG II programming' -- subject(s): RPG (Computer program language) 'Fundamentals of structured COBOL programming' -- subject(s): COBOL (Computer program language), Structured programming


What is structured programming language in C plus plus?

Your question makes no sense.


What is the difference structured programming language and java?

There is no difference between procedural programing language & structure programing language


What has the author Nancy B Stern written?

Nancy B Stern has written: 'Structured COBOL programming' -- subject(s): COBOL (Computer program language), Structured programming