Chapter 7: Programming Concepts and Logics
Short Questions Answers
1. What do you understand by 4GL? Give examples.
Fourth generation language (4GL) is also a high level language. It uses simple English and mathematical statement, much simple than procedure oriented language. It is a non-procedural or problem oriented language. It allows the users to specify what the output should be, without describing all the details of how the data should be manipulated to produce the result. It is developed and used in fourth generation of computers. Examples of 4GL are: Visual Basic, C#, PHP etc.
Merits of using Fourth generation language:
- It is even easier to develop and debug program than procedure oriented language.
- More advanced and user friendly software can be developed.
- Web based software can be developed.
- It is also machine independent language.
- Programmers don’t require detail knowledge of hardware architecture and programmers doesn’t require specifying the working process in detail.
Demerits of using Fourth generation language:
- Program developed in this language cannot be executed directly. It needs to be translated into machine language code (object code). An additional software, compiler or interpreter is required to translate program into object code.
- Program execution will be even slower.
- It is difficult to develop hardware oriented software.
2. What is flowchart? Write the advantages of drawing flowcharts.
Flowchart is the pictorial representation of the program. It explains the sequence of steps of a program by using graphical symbols. It is a graphical technique that can be used by the designers to represent the inputs, outputs and processes of program in a graphical form. Flowcharts are used in analyzing, designing, documenting, or managing processes or programs.
Advantages of drawing flowchart are:
- It is easier to understand and it is more attractive.
- It provides easy communication of logics of the problem.
- It provides effective analysis of given problem.
- It serves as document for solution of problem.
- It helps in efficient programming or coding.
- It serves as design of programs.
- It helps programmers to quickly understand the logic of the problem.
- It helps in maintenance of developed program.
3. Logical errors are difficult to find than the syntax errors. Justify.
Syntax error is the error in the syntax of writing format of the program. Logical error is the error in the logic or concept or idea of the program.
- Difficulty in Finding Logical Errors than the Syntax Error
- Logical errors are difficult to find than syntax errors because:
- Logical errors are not detected by the language translator during translation process but syntax error is detected by the language translator.
- If a program contains only the logical error, it is translated into object code. It will be executed and will also produce output. However, if a program contains syntax error, it is not translated into object code. It will be not be executed and will not produce output.
- Logical error is detected only by comparing the output of the program by the targeted output. However, syntax error is detected by language translator during translation process.
- Reference materials like help file, book and documents are available for the translation of syntax error but not for logical error.
4. Distinguish the terms “Operation” and “Operand” with examples.
The differences between operand and operation are as follows:
Operand | Operation |
|
|
5. Draw of flowchart to test condition, if-then-else in program design process.
Flowchart to test condition, if- Example: then-else
START
6. Explain the difference between syntax and semantics. [5]
The differences between syntax and semantics are as follows:
Syntax | Semantics |
|
|
7. Describe the feature of high level programming language.
High Level Language uses simple English and mathematical statement for developing programs. So, it is easier for development compared to machine and assembly language. It is machine independent language. It is also called as procedure oriented language as programmer has to specify the working procedure in detail. It is third generation language. Examples of high level languages are BASIC, FORTRAN, PASCAL, C, C++ etc.
Features of high level language are:
- It is easier to develop and debug program compared to Low level language.
- More advanced and user friendly software can be developed.
- It is machine independent language. So, program developed for a system can also be used in similar systems (having similar hardware architecture).
- Programmers don’t require detail knowledge of hardware architecture. It is used for general purpose programming language.
- Program developed in this language cannot be executed directly. It needs to be translated into machine language code (object code). An additional software, compiler or interpreter is required to translate program into object code.
- Program execution will be slower.
- It is difficult to develop hardware oriented software.
- Programmers need to specify working process of the program in detail.
8. Explain third generation programming language.
Third generation programming language (High Level Language) uses simple English and mathematical statement for developing programs. So, it is easier for development compared to machine and assembly language. It is machine independent language. It is also called as procedure oriented language as programmer has to specify the working procedure in detail. Examples of third generation programming languages are BASIC, FORTRAN, PASCAL, C, C++ etc.
Merits of using third generation programming language:
- It is easier to develop and debug program compared to Low level language.
- More advanced and user friendly software can be developed.
- It is machine independent language. So, program developed for a system can also be used in similar systems (having similar hardware architecture).
- Programmers don’t require detail knowledge of hardware architecture.
- It is used for general purpose programming language.
Demerits of using third generation programming:
- Program developed in this language cannot be executed directly. It de needs to be translated into machine language code (object code). An additional software, compiler or interpreter is required to translate program into object code.
- Program execution will be slower.
- It is difficult to develop hardware oriented software.
- Programmers need to specify working process of the program in detail.
Long Questions Answers
1. Explain with examples why a program development requires systematic methods. What are the initial steps of program design?
Program development requires systematic methods or order. Once the problem or development is clearly stated, it is broken down into a number of steps that are written in sequential order that contains following properties:
- It should be easy to learn.
- It should be flexible i.e. it should be able to operate with a wide range of possibilities and varieties of options.
- Program development should be correct. It should not contain errors due to simplicity.
- It should be reliable and efficient in terms of processing and memory utilization and it is in compact form.
- It should have an easier user interface and good portability.
- It is easy to debug and it has high extensibility i.e. very easy to add or extend our own functions in a program.
Developing a program requires a systematic method, which is a clear understanding of the problem. After preparing the process, one must recheck so as to ascertain accuracy of the various steps involved. The number of steps in program development should be reduced to a minimum so as to increase the speed of the program development and reduce the program codes and it is secured.
Initial steps of program design are: Preliminary Investigation, Software Analysis and Software Design:
- Preliminary Investigation or Problem Definition: This is the first step of program development. This phase is focused on determining whether or not a new program should be developed and the development team focuses on, survey the software study while collecting the inputs from different sources. Analyzing problems with the current system (manual or automated) in depth and developing possible alternative solutions to the problem. Selecting By the best solution and defining its function with feasibility study.
- Software Analysis or Determination of Software Requirements: Software analysis is the process of analyzing software and to create new software that meets the user’s requirement. During software analysis, data are collected from the various available sources by using tools such as interview, on-site observation, sampling, research and documentation. During this stage, all procedures, requirements must be analyzed and documented. Finally, software analysis determines what software is going to be developed.
- Software Design: This phase is concerned with the design of final software. The design of the software produces the details that clearly describe how software will be developed. During this phase, the designer must design all the aspects of the software from the input and output screen report, database and process of computing. The detailed design information is passed on to the programmers for the purpose of software development.
2. Explain the roles of systems Analyst programmers in the process of systems design and implementation.
System analyst is a computer specialist who is involved in analyzing, designing, implementing and evaluating a computer based information system to support the decision making and support for operations of a whole computer based organization. Among the system design and implementation tasks, the job of system analyst is very crucial.
The role of systems Analyst programmer in the process of systems design and implementation are as follows:
Once the system analyst is involved in conducting the process of systems design and implementation, He studies the existing system by conducting interviews with the users. He may also employ other methods such as observation of system activities and going through the documents of organization. The system analyst should have high communication skill and writing ability.
During the process of systems design and implementation, every Analyst programmer will prioritize requirements by authority: Each user in the organization has some special information needs. It may not be possible to satisfy the needs of one due to the lack of computing capabilities, availability of programmers. Thus, there is a need to set priorities among the requirements of various users. This responsibility of the system analyst requires good interpersonal relations. He must be able to convince all the users about the soundness of group discussion and obtain their cooperation.
Gathering data, facts and opinions of users: Having determined the information needs and their priority, the system analyst must develop the system with the active and willing cooperation of all the users.
Analysis and evaluation: The system analyst analyzes the working of the current information system in the computerized organization. He then shifts through the facts and opinions gathered by him and finds the best characteristics of a new or modified system.
A key job of a system analyst is to obtain the functional specification of the system to be designed in a form which can be understood by users. The specification must be non-technical so that the users and managers can understand it. The specification must be precise and detailed so that it can be used by the system implementer. It must also take into account expansion into the near future.
Once the specification is accepted, the system analyst designs the system. The design must be understandable to the system implementers and it must be modular to accommodate changes easily.
A System analyst is the person who is responsible for the analysis, design and implementation of a system on the computer. The development of a computer information system is a difficult task, which requires a significant amount of time, people and money. The people involved can be broadly classified into technical and non technical. System Analysts should be good at problem solving. He has to know about business operations and a strong background in relevant area of the computer system.
The system analyst needs thorough and ongoing training in system analysis and design. System analysis and design skills can be conveniently factored into three subsets: concepts or principles, tools, and techniques.
3. Who is a system analyst? List and explain the characteristics of a good system analyst.
System analyst is a person who is involved in analyzing, designing, implementing and evaluating a Computer Based Information System (CBIS) to support the decision making and effective operations of an [organization. Among the system development professionals, the job of system analyst is the most important one because he is a captain in a team. So, he should have the ability to study the system, analysis, design and develop the system. Finally, a System Analyst has to know about business operations and strong background in relevant area of the computer system.
The characteristics of a good system analyst are as follows:
Knowledge of Organization: A system analyst must understand the way in which various functions of an organization. He must have good knowledge about how the organization functions. He must understand the management structure and the relationship among the departments in the organization, its day to day operations.
Technical Knowledge: A system analyst must have good knowledge about new technology and should be well-trained in relevant areas of computer science. He must be familiar with the hardware and software of computers and their development process. He must know programming ideas and techniques to be able to design systems, which can be implemented.
Good Interpersonal Communication Skill: System analysts must be able to talk intelligently with high level management, technical staff and non-technical users, programmers and operators. He is required to influence people to change their mind and attitudes and motivate them to work in a group. He must be a good listener and a good diplomat.
Character and Ethics: System analysts must possess good moral character and a sense of ethics. The nature of the job of system analyst requires a strong character and sense of ethics. Ethics is a personal character quality in which an individual understands the difference between “right” and “wrong” and acts accordingly.
Problem Solving Skill: System analyst must have wide experience in solving the problems. A good system analyst would use the appropriate analytical tools as necessary.
Systems analysis and Design skills: The system analyst needs strong knowledge and experience of system analysis and design, His basic responsibility is to analyze the required system and design it.
4. Explain roles of system analysts and programmers with a distinction between system documentation and program documentation.
Among the system development professionals, the job of system analysts and programmers is an important one as they are involved in conducting system study. They study the existing system by conducting interviews with the users. He may also employ other methods such as observation of system activities and going through the documents of organization. They should have high communication skills and writing ability.
Roles of System Analysts and Programmers The role of the System Analyst and programmers are as follows:
- Defining requirement: It involves understanding user’s requirements by interviewing users and finding out what information is being used in the current system, how it is being used and what are their expectations towards the proposed system.
- Prioritizing requirement by consensus: Each organization has some special information needs. It may not be possible to satisfy the needs of every one due to the lack of computing capabilities, availability of programmers. Thus, there is a need to set priorities among the requirements of various users. This responsibility of the system analyst requires good interpersonal relations. He must be able to convince all the users about the soundness of group discussion and obtain their cooperation.1
- Gathering data, facts and opinions of the user: Having determined the information needs and their priority, the system analyst must develop the system with the active and willing cooperation of all the users.
- Analysis and evaluation: The system analyst analyzes the working of the current information system in the organization. He then shifts through the facts and opinions gathered by him and finds the best characteristics of a new or modified system.
- Solving problems: A system analyst must study the problem in depth and suggest alternate solutions to the management. The relative difficulties in implementing each of the alternatives and benefits of each must be considered so that a manager can pick what he considers as the best solution.
- Drawing up specification: A key job of a system analyst is to obtain the functional specification of the system to be designed in a form which can be understood by users. The specification must be non-technical so that the users and managers can understand it. The specification must be precise and detailed so that it can be used by the system implementer. It must also take into account expansion into the near future.
- Designing system: Once the specification is accepted, the system analyst designs the system. The design must be understandable to the system implementers and it must be modular to accommodate changes easily.
- Evaluating system: A system analyst must evaluate a system after it has its use for a reasonable period of time. The time at which evaluation is to be done, how it is to be done, comments of the users are to be gathered and used must be decided by the system analyst.
System Documentation | Program Documentation |
|
|
5. What are the different phases of software development? Explain each of the phases in detail.
Different phases of the software development are:
- Preliminary Investigation or problem Definition
- Software Analysis or Determination of Software Requirements
- Software Design
- Software Development
- Software Testing
- Software Implementation
- Software Maintenance and Reviews
Preliminary Investigation or Problem Definition: This is the first step of software development. This phase is focused on determining whether or not new software should be developed and development team focus on, survey the software study with collecting the inputs from different sources. Analyzing problems with the current system (manual or automated) in depth and developing possible alternative solutions to the problem. Selecting the best solution and defining its function with feasibility study.
Software Analysis or Determination of Software Requirements: Software analysis is the process of analyzing software and to create new software that meets the user’s requirement. During software analysis, data are collected from the various available sources by using tools such as interview, on-site observation, sampling, research and documentation. During this stage, all procedures, requirements must be analyzed and documented. Finally, software analysis determines what software is going to be developed.
Software Design: This phase is concerned with the design of final software. The design of the software produces the details that clearly describe how software will be developed. During this phase, the designer must design all the aspects of the software from the input and output screen report, database and process of computing. The detailed design information is passed on to the programmers for the purpose of software development.
Software Development: In this phase, developers develop the software according to the design developed in earlier stage. It is the process of transforming the design into the physical system. In this phase programmers write codes in programming language and also develop the technical documentation for the software. At the end of this phase, the software is ready for testing and implementation.
Software Testing: Testing is an essential part of software development. After developing the complete software, it should be tested to determine whether it contains errors or not and whether it meets the user’s requirement or not. During software testing, the software is used experimentally to ensure that the software runs according to its specifications and in the way users expect.
Software Implementation: In this stage, the newly developed software is installed and becomes the part of day to day activities. Users start using the software. It involves loading or distributing developed software to user sites and training user. The process of moving from an old system to new software is called Software Conversion. Software developers must handle this process carefully to avoid losing or corrupting data while the software is in operation.
Software Maintenance and Reviews: Correcting and upgrading process of the software is called software maintenance. Maintenance is necessary to eliminate errors as well as modifying the software to meet the changing needs of the user. Software maintenance involves support after sale.