What is Structured Programming?
After having such hot discussions on three constructs set go to statement and various principle regarding to the structured programming, now the structured programming can be well defined and explained. In the light of these observations structured programming can be defined as:
Structured programming is the writing of code with go to statement kept to a minimum. Preferable only when an error is detected and always in the forward direction
But as in the previous discussions we have said that the use of go to statements should be avoided so the above definition can be modified, and a classical definition of structured programming is given as:
A product is structured if the code block are connected by sequence, selection and iteration only every block has exactly one entry and exit.
This definition looks better than the previous one. But now a question arises: can a program that is written using only the three structures claim to be well structured ? the answer is no it is possible to create a bad program structure using the three structures just as it is possible ( with greater difficulty ) to create a good structure that uses go to statements. To understand this concept we will discuss a number of example.
Example 1. Consider a badly structured program that has been written using many go to . if we now transform this into a program that uses the three structures we still have a badly structured program since we have some nothing significant to improve it.
Example 2. Consider a program to search a table for a required item.
Two alternative solutions are there. First one is the structured one and the
second one is the unstructured. However it is quite possible that neither of these is the best solution.
Example 3. Consider the program shown in fig 6.23, in which the item being sought is first placed at the end of the table.
This is arguably the best of the solutions it is less complex ( the condition in the while statement is simpler) and would execute more quickly on a conventional computer ( for the same reason that there is only one condition to test). This example illustrates that the use of approved structure does not necessarily guarantee the best design.
A structured program is essentially one that can be understood easily, and the most useful tool in understanding is abstraction. Abstraction is concerned with identifying the major elements of what is being studied, and ignoring detail. Such is the complexity of software that we have to do this in order to stand a chance of understanding it.
So now we can define structured programming as:
The systematic use of ( control and data ) abstraction in programming:
Abstraction can only be achieved if the control flow constructs are used in a disciplined way so that a part of structured programming is the avoidance of go to. For example consider the program in fig 6.24.
We can draw boxes around components as shown. Because it is built from limited control structures, we can view the program at all levels of detail as consisting of abstract components that have only one entry and one exit. If we exam one any sub system of the program. It is totally contained the boxes do not over loop. If we look in details at its contents, it does not suddenly sprout connections with other subsystems. Suppose that in the above program we inserted a go to shown in fig 6.25.
Notice though that throughout our discussion we have concentrated almost exclusively on control structures and have neglected references to data. Although a program that uses the three structures may have abstraction of control it may well have global data. This seriously weakens the abstraction since at any level of detail., all of the data have to be considered. So control and data both abstraction are important. There idea of abstraction is a powerful tool in constructing software that is understandable.
Latest technology based Software Engineering Online Tutoring Assistance
Tutors, at the www.tutorsglobe.com, take pledge to provide full satisfaction and assurance in Structured Programming homework help via online tutoring. Students are getting 100% satisfaction by online tutors across the globe. Here you can get homework help for Structured Programming, project ideas and tutorials. We provide email based Structured Programming homework help. You can join us to ask queries 24x7 with live, experienced and qualified online tutors specialized in Structured Programming. Through Online Tutoring, you would be able to complete your homework or assignments at your home. Tutors at the TutorsGlobe are committed to provide the best quality online tutoring assistance for Software Engineering homework help and assignment help services. They use their experience, as they have solved thousands of the software engineering assignments, which may help you to solve your complex issues of Structured Programming. TutorsGlobe assure for the best quality compliance to your homework. Compromise with quality is not in our dictionary. If we feel that we are not able to provide the homework help as per the deadline or given instruction by the student, we refund the money of the student without any delay.
Biology of Major Economically Important Mites tutorial all along with the key concepts of Body Structure of Mites, Biology of the Itch Mite, Morphology of mite and Lifecycle of mite
Motion of Charge Particles in Electric and Magnetic Field tutorial all along with the key concepts of Motion in an Electric Field, Cathode Ray Oscilloscope, Lorentz Force and its Applications and Cyclotron
www.tutorsglobe.com offers data structure homework help, assignment help, case study, writing homework help, online tutoring assistance by computer science tutors.
tutorsglobe.com functions of avc assignment help-homework help by online automatic volume control tutors
tutorsglobe.com air pollution assignment help-homework help by online environmental microbiology tutors
www.tutorsglobe.com offers core financial statements, financial statements, income statement, statement of cash flows - homework help , assignment help by online accounting tutors.
Convection tutorial all along with the key concepts of Conduction of Heat in Fluids, Convection in Fluids, Natural and Forced Convection, Convection of Heat in Liquids, Convection in Gases, Newton's Law of Cooling, Calorimetry experiments
tape recorder is a device that is employed to share the music in a ribbon winded in to small wheels. thus, it is termed as a tape recorder.
Systematic Classification of Bacteria tutorial all along with the key concepts of Bergey's Manual of Systematic Bacteriology, Spirochetes, Gram-Negative Rods, Ordinary Gram-Positive Bacteria, Gram-positive filamentous bacteria, Streptomyces and correlated genera
www.tutorsglobe.com offers ethane homework help, ethane assignment help, online tutoring assistance, organic chemistry solutions by online qualified tutor's help.
origin, evolution and structure of galaxies tutorial all along with the key concepts of active galactic nuclei, galaxy properties and correlations, classification of galaxies and cosmic structure formation
Phylum Mollusca-Helix tutorial all along with the key concepts of The shell, The body, Locomotion, Digestive system and Feeding, Main Digestive Gland, Gaseous exchange, Circulatory system, Excretion and Osmoregulation
Theory and lecture notes of Compensating Wage Differentials all along with the key concepts of compensating wage differentials, Types of Jobs, Workers have absolute information, Reservation Price. Tutorsglobe offers homework help, assignment help and tutor’s assistance on Compensating Wage Differentials.
buoyancy-archimedes principle tutorial all along with the key concepts of concepts of buoyancy, archimedes' principle, relative density, application of archimedes' principle, law of floatation
tutorsglobe.com bohr quantum condition assignment help-homework help by online wave nature of electrons tutors
1946896
Questions Asked
3689
Tutors
1490589
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!