Sie sind auf Seite 1von 3

31.What are the different types of program error? Explain.

Basically there are three types of errors (i) Syntax error:- This type of error occurs when we dont obey the syntax rules. The common syntax error we commit is forgetting to terminate each program statement with a semicolon. Ex: d=mn (ii) Logic error: Logic error are those errors that occur when we implement the algorithm for solving the problem incorrectly. Ex: We have to accomplish C=A+B but by mistake we have typewritten C=A-B. Such program will run properly but will give erratic result. (iii) Runtime error:-Runtime error occurs when a program is run on the computer and the results are not achieved due to some misinterpretation of a particular instruction. Ex: C=C/0;

32.Describe modular programming and the advantage of it.


Ans. In modular programming the whole program is split into modules. A modular program consists of a main module and one or more auxiliary modules. Advantages of modular programming:1. Fewer bug because each set of programming command is shorter. 2. 3. 4. 5. 6. Algorithm is more easily understood. Many programmers can be employed, one on each of the module. Programmers can use their expertise on particular technique Testing can be more through on each of the modules. Allows library programs to be inserted.

Disadvantages of modular programming: a) b) c) Can lead to problems with variable names. Means documentation of modules must be thorough. Can lead to problem when modules are linked because link must be thoroughly tested.

33.Describe user defined function.


Defining commonly and frequently used routines and operations as separate procedures and functions can reduce program size and complexity, making code easier to read and maintain. For example, we need to make changes only once in the procedure or function instead of multiple times throughout your program. Procedures and functions make it possible for us to keep commonly used code in a single location. So we can call it from different parts of our application. For example, the following lines of code illustrate the basic form of a procedure and function: PROCEDURE myProcedu FUNCTION myFunction * Insert function code. RETURN myFuncReturnValue ENDFUNC

34.What are the Programming models?


Programming models are:
(i) Procedural programming: Procedural programming is based on the procedures. In the procedural programming, all the returning sequences of statements placed in a main program. A procedure call is

used to invoke the procedure. After the execution of the statements, flow of control return after the position where the call was made. In procedural programming, the main program is responsible to pass data to the individual calls, the data is processed by the procedures and after the execution of whole program, the resulting data is presented. (ii) Modular Programming: In modular programming the problem is split up into modules.

Advantages of modular design: (a) Some modules will be standard procedures used again and again in different programs or parts of the same program. (b) Since module is small, it is simpler to understand it as a unit of code. It is therefore easier to test and debug. (c) Program maintenance becomes easier because the affected modules can be quickly identified and changed. (d) Modules can be tasted independently, thereby shortening the time taken to get the whole program working. (iii) Structure programming: Structured programming is a programming paradigm aimed on improving the clarity, quality, and development time of a computer program by making extensive use of subroutines, block structures and for and while loops - in contrast to using simple tests and jumps such as the goto statement which could lead to "spaghetti code" which was both difficult to follow and to maintain. (iv) Unstructured programming: In unstructured programming, the functions, sequence of statements are written in single program so one main program gets very large.

35.What is top down design?


Top down design is the technique of breaking problem down into the major tasks to be performed. Each of these tasks is then further broken down into separate subtasks, and so on till each subtask is sufficiently simple to be written as a self-contained module or procedure. The program then consists of a series of simple modules. Advantages of Top Down Design: (a) Increases comprehension (b) Unnecessary lower level details are removed. (c) Reduce debugging time.

36.What is bottom up design?


When faced with a large or complex problem it may be difficult to see how the whole thing can be done. It may be easier to detect parts of the problem taking the easier aspect first and thereby gaining the insight and experience to tackle the more difficult task, and finally to try and bolt them altogether to form the complete solution. This is called a bottom up design. Disadvantages: The parts of the program may not fit together very easily. There may be a lack of consistency between modules and considerable reprogramming may have to be done again.

37.What are the rules for writing Flowcharts?


(a) First formulate the main line of logic, then incorporate the details in the flowchart. (b) Maintain a constant level of detail for a given flowchart. (c) Do not give entry detail on the flowchart. (d) Words in the flowchart symbols should be common statements and easy to understand. (e) Be consistent in using names and variables in the flowchart.

(f) Go from left to right and top to bottom in constructing the flowchart.

38.What is input output control? What are the advantages of it?


It is a technique that allows operators to manage facility of work flow. It is used to control the size of the queue in front of work centre, thereby helping to control manufacturing lead time. Input-output Control is important because it is a form of queue control, and a great portion of the time that a job spends in a plant is spent waiting in queues. Input-output Control is used to monitor and control the amount if work in a queue at a work centre so that it stays within reasonable bounds. Queue times, therefore, are more consistent and predictable. The actual output, in standard hours of works, that flows from a work centre is the demonstrated actual capacity of the centre. Advantages of using Input-output Control

(i) (ii) (iii)

Customer service may improve due to the items or products are produced on time. Efficiency may be improved because of the less work-in-process in cluttering the work centre and adding to overhead costs. Quality may be improved because less work-in-process hides fewer problems.

39.What are the advantages and disadvantages of flowchart?


The advantages of flowchart are:
(i) (ii) (iii) (iv) (v) (vi) (i) (ii) (iii) Conveys meaning better Analyses the problem effectively Effective joining the parts of a system Efficient coding Systemic Debugging Systemic testing

The disadvantages of flowchart are:


Takes more time to draw: flowcharts are very time consuming and laborious to drw with proper symbols and spacing, especially for large complex programs. Difficult to make changes or modifications in the program logic will usually require a completely new flowchart. Non-standardisation: There are no standards determining the amount of detail that should be included in a flowchart.

40.What are the factors influencing inventory?


The objective of inventory control is to minimise cost. While taking inventory control decisions, two important factors have to be kept in mind. i) Demand: demand refers to the quality of finished goods that can be sold during a fixed period of time.

ii) Lead time: When an order is placed, it may take some time before it is actually executed. The actual time taken to fulfil the order is called lead time.

Das könnte Ihnen auch gefallen