PRG/211 – Algorithms and Logic for Computer Programming
Procedural and Objective Programming
Computer hardware runs off different programs that are installed on a computer. For these programs to run, they need to be coded correctly with minimal bugs. Designing and coding are the essentials of programming. The various methods to code a program have grown over the years. There are two basic types of programming that have been around for a long time; procedural programming, and object oriented programming. Procedural programming uses consists of modules that run a series of procedures to obtain data whereas objective oriented programming combines code and data together and may be reused. Although procedural programming was introduced before object oriented programming, both have become the standards on how newer languages are developed. Modules in Procedural Programming
Procedural programming is mostly used for the development of simple programs. It is probably the closest type of programming to machine code. It is the simplest way of telling a computer what to do. Procedural programming uses modules or functions that gather information from the user to execute a series of steps that reads, calculates, and forms the end result for the user. The data from this type of programming is separated from the code which can become a problem if more data is introduced. The benefit of this programming is that large programs may be divided into small programs. The functions of procedural programming use variables. “A variable is a storage location that can be accessed and changed by developer code” (Crews & Murphy, 2009, "Your Second Program: Hello Name"). These variables are basically symbols or names that represent a value. These variables can store information that can be used again, only in the same type of function. For example, a function to calculate a person’s weight cannot be used to calculate a person’s height. This...