Preview

Reusability of Code

Good Essays
Open Document
Open Document
511 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Reusability of Code
Reusability of Code
PRG 211
30, July 2012

Reusability of Code
Reusability of code 's general purpose is to reduce unnecessary coding which in the end reduces project development time and funds. It is essentially taking code from one part of a program and attempting to employ it elsewhere without having to alter too much. This method is similar to reusing software mechanisms in object-oriented programming.

Object-oriented programming and procedural programming are two programming paradigms that distribute common attributes as well as various differences. A procedure is an additional name for a routing, technique or function. Procedures and objects both use algorithms to develop the system and any logical calculation that is necessary for the program. A function is divided from variables and data compositions. Procedures are intended to run the code in a precise order, while OPP merges data with the function in the function changes the data that is bound to it into a unit identified as an object. Other useful features such as abstraction, encapsulation, and inheritance can be achieved while working with OPP.

Procedural Programming
The earliest programming languages were procedural, meaning a program was made of one or more procedures. A procedure is simply a module or function that performs a specific task such as gathering input from the user, performing calculations, reading or writing files, displaying output, and so on. The programs that you have written so far have been procedural in nature. The steps a program must perform to reach the desired outcome. Procedure is an independent entity and a sequence of instructions that are grouped together. In procedural programming, a task is broken down into assortment of variables and subroutines. In OPP, a task is broken down into objects which summarize the data and execution. In a procedural approach, the entirely called variable is termed as a trait of the object. The idea is to encapsulate data and a



References: Gaddis, T. (2010). Starting out with programming logic and design. (2 ed.). Pearson Education, Inc.

You May Also Find These Documents Helpful

  • Satisfactory Essays

    IF You Want To Purchase A+ Work Then Click The Link Below , Instant Download…

    • 503 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    6. What is the difference between passing an argument by value and passing it by reference?…

    • 765 Words
    • 5 Pages
    Satisfactory Essays
  • Powerful Essays

    The purpose of this Lab. is to familiarize student how to solve practical problems programmatically; they will practice on elementary programming using primitive data types, variables, constants, operators, expressions, and input and output. Also, they will learn how to diagnose errors that may occur when a program is compiled or executed. There are some exercises, through which they will understand the concept learn in this chapter.…

    • 2338 Words
    • 10 Pages
    Powerful Essays
  • Satisfactory Essays

    PT1420week5exdkinney

    • 404 Words
    • 2 Pages

    References: Gaddis, T. (2010). Starting out with programming logic & design. Boston, MA: Addison- Wesley/Pearson Education, Inc.…

    • 404 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Mat 540 Week 4 Paper

    • 1775 Words
    • 8 Pages

    Although the details can be quite complex, these details are the basic principles of object-oriented programming.…

    • 1775 Words
    • 8 Pages
    Powerful Essays
  • Better Essays

    Venit, S., & Drake, E. (2011). Prelude to Programming Concepts and Design (5th ed.). Boston, MA: Addison-Wesley.…

    • 1800 Words
    • 6 Pages
    Better Essays
  • Satisfactory Essays

    Procedural language is used for developing simple applications. The languages that use the procedural programming are Pascal and C languages. Some of the benefits of the procedural programming are: easy to read program code, easily maintainable program code as various procedures can be debugged in isolation, code is more flexible as you can change a specific procedure that gets implemented across the program.…

    • 337 Words
    • 1 Page
    Satisfactory Essays
  • Powerful Essays

    Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Chapter 15 Chapter 16 Chapter 17 Chapter 18 Chapter 19 Chapter 20 Chapter 21 Chapter 22 Chapter 23 Chapter 24 Chapter 25 Chapter 26 Chapter 27 An Introduction to Hardware, Software, and the Internet An Introduction to Software Development Objects and Classes Algorithms Java Syntax and Style Data Types, Variables, and Arithmetic Boolean Expressions and if-else Statements Iterative Statements: while, for, do–while Implementing Classes and Using Objects Strings Class Hierarchies and Interfaces Arrays…

    • 3908 Words
    • 16 Pages
    Powerful Essays
  • Powerful Essays

    EAS230Syllabus

    • 1748 Words
    • 8 Pages

    C++ programming: editing, compiling, user I/O, variables (ints, doubles, char, strings, booleans), loops, decisions, functions, pointers, arrays, tables, databases, sorting.…

    • 1748 Words
    • 8 Pages
    Powerful Essays
  • Satisfactory Essays

    This course introduces students to object-oriented programming. It covers object-oriented tools for system analysis, design and development. The course teaches the significance of object-oriented programming, the keywords and constructs of the Java programming language, and the steps required to create simple Java technology programs.…

    • 414 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Lab 3 Student

    • 1264 Words
    • 7 Pages

    This lab accompanies Chapter 2 (pp. 56-68) of Starting Out with Programming Logic & Design.…

    • 1264 Words
    • 7 Pages
    Satisfactory Essays
  • Better Essays

    Structured programming is one of the several different ways in which a programming language can be constructed. "It was originally introduced as a means of getting away from the 'spaghetti' code that was used in the early days and to provide some means by which programmers could more easily follow code written by other programmers." (Hendren, 1998) Structured programming is a procedure-oriented method of designing and coding a program.…

    • 962 Words
    • 4 Pages
    Better Essays
  • Good Essays

    Procedural programming is defined as “A list of instructions telling a computer, step-by-step, what to do, usually having a linear order of execution from the first statement to the second and so forth with occasional loops and branches” ("procedural programming," 2014). This method of programming is dependent on procedures that are executed within a program while data is processed separately. As the program goes through the processes any data will be passed between them. While this separation will not be a problem with smaller, less complex programs, it can make the code tougher to read as the program grows in size. Using OOP will prevent this issue along with giving a programmer a couple of features not offered by procedural programming.…

    • 563 Words
    • 2 Pages
    Good Essays
  • Good Essays

    P1 Programming paradigms

    • 768 Words
    • 3 Pages

    Procedural programming is a term used to describe the way which a computer programmer writes a program. This method of developing software which is also called an application revolves around keeping code as concise as possible. Its operators by reading the tasks that are given in order. Popular software written using procedural programming is Linux. It follows the instructions in a sequence and repeatedly. It’s not always the preferred method of coding applications and software which is highly complex will require literally hundreds or thousands of lines of code making it hard to work with. Examples of computer procedural languages are BASIC, C, FORTRAN and Pascal.…

    • 768 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Introduction to OOP

    • 1088 Words
    • 7 Pages

    Programs could be developed in sensible blocks that make the program more understandable and easier to maintain…

    • 1088 Words
    • 7 Pages
    Satisfactory Essays

Related Topics