Please enable JavaScript.
Coggle requires JavaScript to display documents.
2.1 Demonstrate Programming Life Cycle (PLC) & 2.2 Understand problem…
2.1 Demonstrate Programming Life Cycle (PLC) &
2.2 Understand problem solving concept
7 phases in programming life cycle
Design the algorithm to solve the problem
Once you fully understand the problem and have clarified any questions you have, you need to develop your solution.
Algorithm is a set of instructions for the computer
Setting up the algorithms is probably the hardest part of problem solving on the computer
The instructions cannot assume anything, cannot skip steps, must be executable one step at a time and must be complete
IPO (Input-Processing-Output) chart
shows in more detail
what data items are input,
what processing takes place on that data and
what information will be the end result the output
Flow chart
graphic representations of the algorithm
shows the flow of processing from the beginning to the end of the solution
each block in a flowchart represents one instruction from an algorithm
flow lines indicate the direction of the data flow
Structure Chart
Show how program segment or modules are defined and how they relate to one another.
The module in the upper row serve as control functions directing the program to process modules under them as appropriate.
It follows a top-down design philosophy.
Pseudo code
Uses English like statements in place of the flowchart graphical symbol
It is easier to code a program from it than from flowchart
It is not tied to any programming language
It is easy to modify but not graphical, difficult to use for logically complex problems, and slower to create.
Implement the algorithm
This step involves writing the algorithm as a program
By using flow chart as the guideline, start writing a program from the top of flow chart and work your way to the bottom
Analyze the problem
Identify the problem inputs you have to work with, process and also the problems outputs (results) desired.
Check any additional requirements or constraints on the solution
Determine the required format of the results to be displayed
Develop a list of variables.
Test and verily the complete program
After writing the program, you must test it
Program testing can be a very tedious and time consuming.
Run the program several times using the different sets of data.
Make sure that it works correctly for every situation provided in the algorithm
Example: Blackbox Testing or Whitebox testing.
Blackbox Testing
blackbox testing gets its name from the concept of testing the program without knowing the inside - without knowing how its work.
by a user
Whitebox Testing
whitebox testing assume that the tester knows everything about the program
it is a programmer's responsibility
Specify the problem
The first step in solving any problem is to understand it.
Read the requirements statement carefully.
State the problem clearly and unambiguously
Gain clear understanding of what is required for its solution.
Maintain and update the program
Maintenance and update are the modification of a software product after delivery to correct faults, to improve performance or other attributes, or to adapt the product to a modified environment
Documentation
documentation should be concise so the person who reads it doesn't have to spend too much time to find what he or she is looking for.
Internal documentation
The comments you put in your source code files should be written to help other programmers navigate through your code easily in order to find bugs or to determine where to add new features.
External documentation
-Made up of the manuals written about the solution
-Written text that accompanies computer software.
-It either explains how it operates or how to use it, and may mean different things to people in different roles.
Errors
Errors are so common that they have a special name (BUGS). Bugs must be identified and corrected.
The process of identifying and correcting bugs is known as debugging
When the compiler detects an error, the computer will display an error message, which indicates that you have made a mistake and what the cause of the error might be.
Run –time error
Are detected by the computer and are displayed during execution of a program.
A run-time error occurs when the program directs the computer to perform an illegal operation, such as dividing a number by zero
Logical Error
The hardest errors to find and fix.
A logic error means although the language syntax was used correctly, there was a misunderstanding
Syntax Error (Compilation Error)
An error in the format of a statement in a computer program that violates the rules of the programming language employed.
A program will not be executed until all syntax errors are corrected
Error can be traced at the event of compilation
Types of maintenance
Adaptive maintenance
Modification of a software product performed after delivery to keep a software product usable in a changed or changing environment. It deals with adapting the software to new environment
Perfective maintenance
Modification of a software product after delivery to improve performance or maintainability. It deals with updating the software according to changes in user requirements.
Corrective maintenance
Reactive modification of a software product performed after delivery to correct discovered problems. It deals with fixing bugs in the code.
Preventive maintenance
Modification of a software product after delivery to detect and correct latent faults in the software product before they become effective faults. It deals with updating documentation and making the software more maintainable.
DEFINITION
Problem-solving is a mental process that involves discovering, analyzing and solving problems.
The ultimate goal of problem-solving is to overcome obstacles and find a solution that best resolves the issue.
There are six steps to follow to assure the best decision
Identify the problem
Understand the problem
Identify alternatives ways to solve the problem
Select the best way to solve the problem from the list of alternative solutions
List instructions that enable you to solve the problem using the selected solution
Evaluate the solution
Types of problems that can be solved on computer are:
Computational
problems involving some kind of mathematical processing
Logical
problems involving relational or logical processing
Repetitive
problems involving repeating a set of mathematical and /or logical instructions
Define Input, Process and Output
Process
Performing operations on data
Computer processes raw data into usable information to be used by user. Data processing is done by the CPU (Central Processing Unit).
Output
Presenting the results
Output is raw data that has been processed by the computer (result). Output will be converted to an understandable form before being displayed or printed.
Input
Entering data into the computer
Refers to the process of entering data, program and instructions into the computer system using input devices