Implementing algorithm
A well designed algorithm can be easily implemented, almost mechanically. However, there are many points to be considered in order to implement the algorithm in an efficient manner. These are:
Modularity
Breaking the tasks into different modules decreases coding and increases readability. For example if a program requires sorting at various points then a specific sorting procedure should be written for sorting the data. Care should be taken that the modularization does not make the program take more time to execute.
Example:
Let us consider a student's record which maintains student details, in sorted order, of the student's names. To add the name of a new student the name will be passed to sort module.
For example the existing student names are: Anand, Chitra, Nirmal.
If a new student Bharat is to be added in the list, this name will be passed to sort module. Let us see the steps of sort module algorithm.
Read the new student's name
Check the list till the name already in the list is greater than the new student's name or the list ends.
If a name is greater than the new student's name insert the new name before the name which is greater than the new name.
If list ends than add the name in the end of the list
In our example the loop terminates at the stage where Chitra is greater than Bharat and Bharat will be inserted before Chitra. If the new student's name is Manoj than the name will be added in the end list.
Procedure and Variable Names
Procedure and variable names should be self explanatory such as "Name", "Salary", "Total Amount" instead of single letters and meaningless words. This increases readability. Use variables of any length, but make sure the length of the variable is such that the computer's operating system supports and name variables and procedures accordingly. For example, DOS does not support more than eight characters.
Testing
Testing the program should be started with the smallest input value. Check the conditions which the program is supposed to handle. Verify the output for all possible invalid conditions.
Debugging
Implementing algorithm requires necessary tests to check whether the program is performing according to the requirement. The syntactical errors can be rectified during compilation. To eliminate logical errors one of the simplest method is writing a procedure that will print a set of statement at various points of execution. This can be removed after completing the implementation.
The current day computer though has also goes through rapid change throughout the last fifty years. This period, throughout that the evolution of computer took place can be separated into five different phases termed as Generations of Computers.
tutorsglobe.com hepatitis e assignment help-homework help by online hepatitis viruses tutors
a good insulating material has to possess the following characteristics - extremely high insulation resistance, high dielectric strength, low thermal expansion.
tutorsglobe.com light microscopy assignment help-homework help by online light and electron microscope tutors
Converging Lens and Diverging Lens tutorial all along with the key concepts of Images Formed by the Convex (Converging) lens, Object is kept at Principal Focus, Images Formed by Concave Lens
Try our Geometric and Wave optics Assignment Help service right away and consider you are just a click away from academic success!
Law of Thermodynamics tutorial all along with the key concepts of Thermodynamic terminology, State Variables, Zeroth law of Thermodynamics, Extensive and Intensive Variables
www.tutorsglobe.com offers statement of financial position homework help-assignment help by online accounting tutors.
Population genetics tutorial all along with the key concepts of History of Population Genetics, study of allele frequency, emergence of modern evolutionary synthesis, Population genetics as a discipline
tutorsglobe.com comparison of direct and indirect methods assignment help-homework help by online techniques of immunofluorescence tutors
Manufacture of Sulphuric acid and Sulphates tutorial all along with the key concepts of Manufacture of Sulphuric Acid, Contact Process, Manufacture of Sulphates
tutorsglobe.com methods and tools of financial management assignment help-homework help by online financial management tutors
herbarium is a collection of pressed, dried plant specimens that mounted on particular sheets, recognized and arranged in the order of an accepted and familiar system of classification.
First and Second Order Reactions tutorial all along with the key concepts of method of calculating First order rate constant, Half-Life of First Order Reactions, Rate Laws for Second Order Reactions and Half-Life of a Second Order Reaction
tutorsglobe.com role of bacteria in medicine assignment help-homework help by online beneficial activities of bacteria tutors
1957429
Questions Asked
3689
Tutors
1440990
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!