Program Development PART 3

System Design Technique
There are two system design techniques, given as follows:
Top-Down Design- The top-down design technique is based on the fact that large problems become more manageable if they are divided into a number of smaller and simpler tasks which can be tackled separately. The top-down design approach is performed in a special way. the main program is written first. it is tested before some programs are written. for this, actual subprograms are replaced with stubs. the study simply tests to see if the data is passed correctly. after the main program is written and check, is module is written and tested in turn. this should first be done without the main program in order to let us stuff is an error occurs.
Bottom-Up Design- In the bottom-up approach, it is usually assumed that the basic proteins created will be general enough to be used more than once. using the subroutines, to construct a program save repeating the same lines of code by using it. A bottom-up approach would be used to write the most basic subroutines in the hierarchy first and then use them to make more sophisticated subroutines. That your bottom-up approach is generally not recommended because it is difficult to anticipate. The low-level securities will be needed for any particular program. It can be the useful first step to produce a library of basic functions and procedures before embarking on a major project.
Structured Programming
Programming, even in a high-level language, has always been considered as an art rather than as a science. If a problem is given to 10 programmers then they will come up with 10 different flowcharts for programs. Although, all the achieve the same result for a given input, the productivity ratio of the program the first widely from one program to another. The difference in the productivity ratio tempted the scientist to take up the search in this area. Dijkstra of Netherland cranes up with the concept of structured programming. In fact, he was the first person to use the term structured programming. The objective of the structured programming is to provide a methodology in which:
1.     The user may develop programs quickly which fewer mistakes.
2.     Readability of the program is increased
3.     Flexibility of the program is much improved i.e. the programmer that may modified the program without affecting the other portions of the program.
In other words, structured programming is a disciplined approach towards a programming that promoter clear, efficient and error-free programming. these objectives are incorporated into the programming language by The structures such as sequential structures, Condition and repetitive structure. without this statement, you will be forced to use the undecidable statement called as goto statements. The language that offers this statement are known as structured language and the program utilising these structures are called as structured program.
Advantages: The structure programs are written using for certain constructs which are commonly accepted. However, structured programs have their own advantages and disadvantages. The following are the major advantages of structured programs;
1.     A structured program of any size can be read and understood in a completely systematic way.
2.     structures can be easily assemble and made into modules.
3.     structured programming helps to increase programmers productivity.
4.     structure programs are easy to modify, update and extend.
5.     structured programming in poses a certain amount of discipline on the programmer while preparing programs.
Disadvantages: The following are the disadvantages of structured programs.
1.     Structured program generally have redundant codes and are lengthy as compared to unstructured programs.
2.     Structured programs often use more memory and may execute slower.
3.     Limiting The structures two, three or four basic forms, make some task rather messy to perform.
 Modular Design
The basic idea underlying modular design is organize a Complex system (such as her last program, an electronic circuit or a mechanical device) asset of distinct components that can be developed independently and then plugged together. The following designs principles are particularly relevant to modular programming.
1.     Provide Simple InterfacesSimple interfaces reduce the number of directions that must be considered when verifying that a system performs its intended function simple interfaces also make it easier to reuse components in different circumstances. Not only does it reduce time spent in coding, design and testing, but it also allows development cost to be amortised test over many projects. as an example, modular implementation of a climate mod tell me to define distinct module considered with atmosphere modeling, ocean modeling etc. the interfaces to each module can comprise small sets of procedures that access boundary data, advance the simulation, and so on. hence, there is no need for the user to become familiar with the implementation of the various modules, which collectively may comprise hundreds of fishes and tens of thousands of line of code.
2.     Ensure that Modules Hide InformationThe benefits of modularity not follow automatically from the act of subdividing a program. The way in which a program is decomposed can make an " enormous difference to how easily the program can be implemented and modified". Experience shows that each module should encapsulate information that is not available to the rest of a program. This information hiding reduces the cost of subsequent design changes. For example, a module may encapsulate.(i) Related function that can benefit from a common implementation of that are used in many parts of a system.
(ii) Functionality that is likely to change during later design or development.
(iii) Aspects of a problem that are particularly complex; and/ or
(iv) Code that is expected to be reused in other programs.
Notice that we do not stay that about you should contain functions that are logically related, because, for example, they solve the same part of a problem full. This sort of decomposition does not normally faculty at maintenance or promote code reuse.
3.     Use Appropriate Tools: While modular designs can in principle be implemented in any programming language, implementation is easier if the language supports information hiding by permitting the encapsulation of code and data structures. Fundamentals mechanism in this regard includes the procedure (or subroutine or function) with its locally scope variable argument list, used to encapsulate code, the user-defined data type, used to incomplete data and dynamic memory allocation the, which allows subprograms to acquire storage without involvement of a calling program. these features are supported by most modern languages(e.g., C++, Fortran90 and Ada) but are lacking and rudimentary in some older languages (e.g., Fortran77).
4.     Design ChecklistThe following design checklist can be used to evaluate the success of a modular design. as usual, each question should be answered in an affirmative.
o    does the design identify clearly design modules?
o    do each module have a clearly defined purpose?
o    is is modules interview sufficiently abstract that you do not need to think, about its implementation in order to understand it? does it hide its implementation details from other models?
o    have subdivided modules as far as usefully possible?
o    have you verify that the friend what does do not replicate functionality?

o    have you assaulted those expects of the design that is most hardware scientific, complex or otherwise likely to change?

Comments

Popular posts from this blog

Flowchart...

Rules of Flowchart