Preview

Reusability of Code

Satisfactory Essays
Open Document
Open Document
486 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Reusability of Code
Reusability of Code
University of Phoenix

Reusability of Code Designing a code can often take a lot of time, depending on the complexity of the coding. This is why code reusability has become a standard when it comes to computer programming. But to understand why you would reuse code, you need to understand what goes into creating code. This essay will compare and contrast procedural programming modules and objects. Also, it discuss the security terms in hiding code, passing of data versus data encapsulation, code reuse in more than one program, and how object-oriented methods are similar to procedural modules. According to Gaddis (2010) there are two methods of programming that are primarily used: Object-oriented and Procedural. Procedural programming is more focused on creating procedures; object-oriented programming is focused on creating objects. When dealing with procedures, the data items are separate from the procedures. Gaddis (2010) says this can cause problems, but at the same time it will help the program become larger and more complex. But where procedural programming separates code and data, object-oriented programming handles it through encapsulation and data hiding. Encapsulation takes an object and combines data and code into it. Data hiding makes it possible to hide code in the inside of an object from the code outside of the object. An object normally hides its data, but leaves the methods available for access. Gaddis (2010) states, “When an object’s internal data is hidden from outside code and access to that data is restricted to the object’s methods, the data is protected from accidental corruption.” There is also no reason to worry about formatting of the code inside the object, just the methods of the object. If you want to reuse codes, the best way to do it is to create modules. They let you duplicate code in a program so that you can execute whenever you need the service. The Microsoft website (What Is Reusable



References: Gaddis, T. (2010). Starting Out with Programming Logic & Design (Second Edition ed.). Addison-Wesley. Microsoft. (2013). What Is Reusable Code? Retrieved from msdn.microsoft.com: http://msdn.microsoft.com/en-us/library/office/aa189112(v=office.10).aspx Venit, S., & Drake, E. (2011). Prelude Programming Concepts and Design (Fifth Edition ed.). Addison-Wesley.

You May Also Find These Documents Helpful

  • Satisfactory Essays

    IT210 Week 3

    • 756 Words
    • 4 Pages

    Resources: Review the example in Appendix E and the additional examples on pgs 80-83 of Prelude to Programming…

    • 756 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    The data access object (DAO) software program design pattern encapsulates use of data by concealing its difficulty from end users (University of Phoenix, 2005). This design pattern is a concept offering an abstract interface to a database or perseverance method, which it only provides a few specified functions excluding the visibility of the database particulars. The DAO includes a mapping from the software calls to its perseverance layer that isolates the general public interface of the DAO.…

    • 579 Words
    • 3 Pages
    Satisfactory Essays
  • Best Essays

    Dennis, A. (2009). Program Design. In Systems analysis and design (pp. 353-391). Hoboken, NJ: John Wiley & Sons.…

    • 3816 Words
    • 16 Pages
    Best 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
  • Good Essays

    Pm3110 Unit 5 Lab Report

    • 343 Words
    • 2 Pages

    Classes are useful for length programs which require large amounts of similar code. Classes can accelerate program development by reducing redundant code, testing, and debugging. Using classes also makes the code easier to read and follow for other programmers.…

    • 343 Words
    • 2 Pages
    Good 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
  • Good Essays

    While making a program in .NET for commercial usages, there are many methods which are used to prevent reverse engineering and unauthorized usage of that particular program. While keeping the code 's functionality intact, the obfuscation methodology changes the coding in such a way that it becomes quite difficult even with tools to reverse engineer. Remember it becomes difficult not impossible to reverse engineer an obfuscated code. There are numerous ways and means to…

    • 793 Words
    • 4 Pages
    Good 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
  • Good Essays

    6. Data hiding, which means that critical data stored inside the object is protected from code outside the object is accomplished in Java by _____.…

    • 1518 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    What is procedural or algorithmic programming? What is object-oriented programming? What is the role of code reuse in object-oriented programming? Under what circumstances is object-oriented programming best suited? Under what circumstances is procedural or algorithmic programming best suited?…

    • 503 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    The implementation guidance in ASC 205-20-55 provides a model for evaluating the two criteria in…

    • 349 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Array Structure Proposal

    • 574 Words
    • 3 Pages

    In this proposal we will focus on the objects and object-oriented programming that will help solve the problem of the Police Department report writing issue. An object doesn’t exist until a case of the class has been formed. When the object is formed, space for the object is allocated in memory. Multiple objects can be created from just one class. “Objects are created from abstract data types that encapsulate data and functions. An object is a software entity that contains both data and procedures” (Gaddis, 2010). “Object-oriented programming (OOP) is a programming paradigm using "objects" – usually instances of a class – consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction, encapsulation, messaging, modularity, polymorphism, and inheritance” (Wikipedia, 2012). “Objects are created from abstract data types that encapsulate data and functions together” (Gaddis, 2010). Gaddis went on further to say that “An object is a software entity that contains both data and procedures” (Gaddis, 2010).…

    • 574 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    It 210

    • 2960 Words
    • 12 Pages

    Prelude to Programming: Concepts and Design, Fifth Edition, by Stewart Venit and Elizabeth Drake. Published by Addison-Wesley. Copyright © 2011 by Pearson Education, Inc.…

    • 2960 Words
    • 12 Pages
    Powerful Essays
  • Powerful Essays

    It 210 Weeks

    • 2760 Words
    • 12 Pages

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

    • 2760 Words
    • 12 Pages
    Powerful Essays
  • Satisfactory Essays

    week 1 assignment

    • 1379 Words
    • 6 Pages

    Drake, E., & Venit, S. (2011). Prelude to programming: Concepts and design (5th ed.). Boston, MA: AddisonWesley.…

    • 1379 Words
    • 6 Pages
    Satisfactory Essays