Program Planning ,Process and Programming Tools.
Program Planning is used to write a correct program, a programmer must write each and every instruction in the correct sequence. Program Planning is logic (instruction sequence) of a program which can be very complex . Hence, Program planning must be planned before they are written to ensure program instructions are:
– It should be appropriate for the problem.
– It should be in the correct sequence.
Program planning is the most common way of characterizing and coordinating the means and assets expected to accomplish a particular objective or put forth of objectives. It frequently includes recognizing targets, fostering a system, making a timetable, and dispensing assets. Program planning is regularly utilized in project the executives, occasion arranging, and hierarchical turn of events. The objective of program planning is to guarantee that all essential advances are taken and assets are utilized successfully to accomplish the ideal result.
Programming Tools:
A programming tool may be any software program or utility that aids software developers or programmers in creating, editing, debugging, maintaining and/or performing any programming or development-specific task. A programming tool is also known as a software development tool.
There are many programming tools accessible, contingent upon the programming language and type of development. Some common programming tools includes:
- Integrated Development Environments (IDEs) like Visual Studio, Eclipse, and Xcode, which provides an extensive software development environment with features like code editing, debugging, and project management.
- Text editors like Sublime Text, Atom, and Visual Studio Code, which are lightweight options in contrast to IDEs and provides basic code editing functionality.
- Source control management tools like Git, Mercurial, and Subversion, which permits developers to team up on code and track changes.
- Build tools like Gradle, Expert, and Make, which robotize the method involved with arranging, testing, and deploying code.
- Troubleshooting tools, for example, gdb, lldb, and the Visual Studio debugger, which permits developers to track down and fix mistakes in their code.
- Profiling tools, for example, perf, gprof, and valgrind, which permit developers to analyze the performance of their code and distinguish areas for optimization.
- Package managers, for example, npm, pip, and gem, which permit developers to easily and manage dependencies in their projects.
• Programming Tools Consists of Following:
– Algorithm
– Flowchart
– Pseudocode
– Decision Table
Algorithm:
Algorithm is defined as a set of step-by-step instructions that perform a specific task or operation. It is a precise specification of a sequence of instructions to be carried out in order to solve a given problem. In this time and space complexity associated with each algorithm. Time complexity specifies the amount of time required by an algorithm for performing the desired task.
Space complexity specifies the memory space required by an algorithm for performing the desired task. It is possible to have more than one algorithm to provide required solution. The algorithm that takes less time and requires less memory space is considered as the best one.
Characteristics of an Algorithm:
Following are the characteristics of an algorithm
• Finiteness
– An algorithm must always terminate after a finite number of steps.
• Definiteness
– Each step of an algorithm must be precisely defined; the actions to be carried out must be unambiguously specified for each case.
• Input
– An algorithm has zero or more inputs, i.e. , quantities which are given to it initially before the algorithm begins.
• Output
– An algorithm has one or more outputs i.e. , quantities which have a specified relation to the inputs.
• Effectiveness
– All of the operations to be performed in the algorithm must be sufficiently basic and easy to perform
Strategy for Developing Algorithm:
• The development of an algorithm (a plan) is a key step in solving a problem. Once we have an algorithm, we can translate it into a computer program in some programming language. Algorithm development process consists of three major steps:
– Step 1: Investigation /Obtain a description of the problem.
– Step 2: Develop a high-level algorithm / Preliminary Algorithm.
– Step 3: Refine the algorithm by adding more detail.
Step 1: Investigation /Obtain a description of the problem:
It helps to identify the processes, identify the major decisions, identify the repetitions and identify the variables.
Step 2: Develop a high-level algorithm / Preliminary Algorithm:
It develops a high-level (general ) algorithm and it steps through the algorithm
Step 3: Refine the algorithm by adding more detail:
It incorporate any refinements indicated in step 2. It groups together processes where it is appropriate, group together variables where appropriate and It tests the algorithm again by stepping through it.
Example 1 To find the sum of two numbers.
Step1: Start
Step2: Input any two numbers A and B
Step 3: Sum = A+B
Step 4: Print Sum
Step 5: Stop
Example 1 Algorithm to convert ft. to cm.
• Step 1: Start
• Step 2: Input Lft
• Step 3: Lcm = Lft x 30
• Step 4: Print Lcm
• Step 5: Stop.
Example 3 Algorithm to find area of your class room
• Step 1: Start
• Step 2: Input Width, Length
• Step 3: Area = Length x Width
• Step 4: Print Area
• Step 5: Stop
Example 4 Algorithm to find greater number between two numbers
• Step 1 : Start
• Step 2 : Input a, b
• Step 3 : if a > b then Output a else Output b
• Step 4 : Stop.
Example 5 Algorithm to check even number
• Step 1 : Start
• Step 2 : Input num
• Step 3 : if num%2 == 0 then Output num is
even else Output num is odd
• Step 4 : Stop
Advantages of using Algorithm:
• It is a step-wise representation of a solution to a given problem, which makes it easy to understand.
• An algorithm uses a definite procedure.
• It is not dependent on any programming language, so it is easy to understand for anyone even without programming knowledge.
• Every step in an algorithm has its own logical sequence so it is easy to debug.
• By using algorithm, the problem is broken down into smaller pieces or steps hence, it is easier for programmer to convert it into an actual program.
Disadvantages of Using Algorithm:
• It is time consuming process
• All problems are difficult to present in algorithm
• It is not compulsion to write the algorithm.
An Algorithm is not a computer program, it is rather a plan for problem solving.
Representation of Algorithms:
• As programs
• As flowcharts
• As pseudocodes
• When an algorithm is represented in the form of a programming language, it becomes a program .Thus, any program is an algorithm, although the reverse is not true.
FAQ:
1. Define Program Planning ,Process and Programming Tools.
2. Define Algorithms.
3. Explain Characteristics, Advantages, Disadvantages of an Algorithms.
4. Write various examples of an Algorithms.
Thank You!!!
Deep99Notes