Premium Essay

Reusability of Code

In: Computers and Technology

Submitted By h3lP3r
Words 515
Pages 3
PRG/211
Reusability of Code Writing software can be a very time consuming task depending on many things including the complexity of the program. When writing a program there are two main methods a programmer can take advantage of Procedural and Object-oriented programing. Procedural programming uses a step by step method of procedures to produce the desired result, whereas object-oriented programming or OOP is broken down into encapsulated objects that can be used independently to perform the task with its own method. One very common technique among developers is the reusing of code, because this technique reduces the amount of unnecessary coding which saves the developer a tremendous amount of time, whether it is the reusing of procedures or the reusing of software components in object –oriented programing both ways allow a programmer to save valuable time when developing software. Procedural programming focuses on creating procedures these procedures or modules are used and focused on one at a time to complete the tasks. These procedures pass data from one to another in that step by step fashion aforementioned. This method can cause serious problem if a change to the program is required, because these procedures may contain sub-procedures and sub sub-procedures. If a major change to the main procedure is require this change could cascade to the sub-procedures resulting in a serious problem for the programmer. Object-oriented programming focuses on creating object and within these objects are data and the procedures which operate the data. The data is then encapsulated into the object eliminating the problem with the code that a programmer would run into while procedural programming. Although procedural programming and object-oriented programming differ in so many ways they also share some similarities. One of the similarities that the both share…...

Similar Documents

Premium Essay

Code Reuse

...used method today. Both of these methods use programming code, data and procedures to communicate with the computer. The difference between the two is that the interaction of data, procedures and functions. Programming is a very time consuming process and takes a lot of trial and error to create a good product. Programmers have found a way to shorten some of that time by using code reusability. Programmers are now fonder of object-oriented programming because of code reusability. In procedural programming, it is a step by step process that is very detailed and intricate which keeps data and the procedures separate with data passed from one procedure to another. (Gaddis, 2010) When a program is larger and more complex, this separation of data and procedures makes it more difficult for a programmer and could require many modifications to complete their goals. Because of these modifications, there is more chance for errors in the code, so reusing this type of code is not really practical. With object-oriented programming, data and procedures are kept together in an object but separate from the programs actual code. The data and procedures in an object work together but the code can only interact with the objects procedures. By separating the code and data, this guarantees that the data cannot be accidentally corrupted. (Gaddis, 2010) These objects can then be reused where useful in other programs. A good example of code reuse would be web browsers on the internet. Each......

Words: 637 - Pages: 3

Free Essay

Reusability of Code

...Reusability of Code One of the key factors for large software development projects is the ability to reuse code amongst team members. This allows for efficiency and reduces the time to get a software product delivered to a customer (or brought to market). This paper is intended to focus on the different areas that would benefit a software development team (or company) by having a structured and reusable code library in place. I have experience in supporting large ECM (Electronic Content Management) systems and I will refer to these re-world scenarios throughout this document. Reusability refers to the ability for a single developer that specializes in one area (or is assigned the task of developing) to develop a class or specific code that can then be used by other developers. As an example, a senior developer defines a class that serves as a blueprint for developing various objects that would input data into a Filenet ECM system. Once this class has been defined and created, other developers can reuse this class to develop objects that allow for public input and that will eventually store data in the ECM database. This stored data that is specifically formatted to be read by the Filenet application, allows end users to run reports that have a specific output that the want to view. In essence, the reusability of code is akin to manufacturing one part of a car that can then be used for many cars (such as a single frame that can hold various models of cars). The......

Words: 317 - Pages: 2

Premium Essay

Code

...Pseudocode syntax, descriptions and examples Overview: This table provides a reference for commonly used pseudocode for introductory computer program design courses. You should use this as your reference and copy and paste code examples into your projects to ensure you are using proper syntax. Be sure to indent your code to make it more readable and use modify and enhance from the examples as needed. Also, capitalize the first letter of your pseudocode (e.g. While, not while). Pseudocode Write/Prompt Description Displays messages and other information on the screen Flowchart equivalent Write “What is your name?” Input Pauses execution, allowing the user to enter data Input FirstName Input FirstName Compute/Set Assigns a value to a variable Set Avg=(num1+num2)/2 Declare Example usage Write “What is your name?” Write “Your name is “ +YourName + “.” Prompt for ItemName, Price, Quantity Declares a variable to be of a specific type Input Number1, Number2 Compute average value: Set Avg= (num1 + num2)/2 Compute total cost: Set TotalCost= 1.25*Songs Declare FirstName As String Declare FirstName as String Declare Num1, Num2 As Integer Possible datatypes may include: String 1 Call Requests a module, subprogram, or function be executed Call WriteNums(num1, num2)) If End If Tests if a condition is met. If the test condition is true, the statements are executed. Enter Is Number < 5? Character Integer Float Main Module Write “Enter 2 numbers” Input Num1,Num2 Call......

Words: 712 - Pages: 3

Free Essay

Codes

...ALT Codes - Alt Codes for Maths / Mathematics Welcome to Useful Shortcuts, THE Alt Code resource! If you are already familiar with using alt codes, simply select the alt code category you need from the table below. If you need help using alt codes find and note down the alt code you need then visit our instructions for using alt codes page. List of Alt Codes for entering Mathematical Symbols ALT Codes for Mathematical Symbols | Alt Code | Symbol | Description | Alt 48 - 57 | 0 - 9 | zero to nine | Alt Codes for Basic Operators | Alt Code | Symbol | Description | Alt 43 | + | Plus Sign | Alt 45 | - | Minus Sign | Alt 0215 | × | Multiplication Sign | Alt 0247 | ÷ | Obelus / Division ign | Alt Codes for Pers | Alt Code | Symbol | Description | Alt 37 | % | Percentage Sign | Alt 0137 | ‰ | Per mille (per thousand) | Alt Codes for Bracketing | Alt Code | Symbol | Description | Alt 40 | ( | Open Bracket | Alt 41 | ) | Close Bracked | Alt Codes for Degree of Accuracy | Alt Code | Symbol | Description | Alt 241 | ± | Plus or Minus | Alt Codes for Fractions | Alt Code | Symbol | Description | Alt 47 | / | Fraction seperator | Alt 0188 | ¼ | Quarter | Alt 0189 | ½ | Half | Alt 0190 | ¾ | Three quarters | Alt 46 | . | Decimal Point | Alt Codes for Equality | Alt Code | Symbol | Description | Alt 240 | ≡ | Exactly Identical | Alt 61 | = | Equals ...

Words: 513 - Pages: 3

Premium Essay

Code Resusability

...Reusability of Code PRG/211 Reusability of Code When a developer is deciding to write code or a full out program, he/she must take into account the method of the code. There are many types of programming languages, but there are essentially two types of programming: procedural and object oriented (OPP). Both have their place in programming but you can also find procedural in OOP as well. But first we need to see what are the differences and similarities between the two. Structured programming consists of a level of such straightforwardness is reached that the execution is obvious to the programmer. Object-oriented programming consists of assemblage code with the data on which it operates so that this "object" can function separately of the rest of the software system. Structured programming and object-oriented programming are not exclusive from each other. You can structure the code in an object, and you can use objects to implement the modules of code in a structured program. Task vs. Data Structured programming is based around data structures and subroutines. The subroutines are where stuff actually "happens", and the data structures are simply containers for the information needed by those subroutines. Object oriented programming, on the other hand, shifts your primary focus to the data itself. Instead of asking "what do I want to do and what will I need to know to do it", you ask "what kind of things do I want to have and what can those things do......

Words: 335 - Pages: 2

Premium Essay

Reusability of Codes

...Assignment week 1 Course: PRG/211 - ALGORITHMS AND LOGIC FOR COMPUTER PROGRAMMING Submitted by: Gbigbi Jonathan Richards Subject: Reusability of codes Date: June 3, 2013 Reusability of codes Reusability In other words, we should be able to use instances of the same component in different systems. This isn't always possible. Sometimes a component needs to provide additional services or the implementation of a provided service needs to be altered slightly. A well designed component should anticipate these modifications by providing hooks that allow users to extend or alter functionality without modifying the internal structure of the component. There are several principles that help us create reusable components. Components should be general, abstract, and not too smart. Procedural programming modules and objects are similar in that they use most of the same commands to execute their functions and store their data but also are very different. Procedural modules are easier to use for small specific programs that perform specialized functions. Objects are better used for more general operations that show a need for more complex and reusable functions that may require security and hidden code to avoid any corruption or mistakes. Both options permit private and local variables to be declared but modules can use data separate from the module where an object has its within itself and can be accessed only through its own methods when it is......

Words: 428 - Pages: 2

Free Essay

Code

..."The code of the streets is actually a cultural adaptation to a profound lack of faith in the police and the judicial system. The police are most often seen as representing the dominant white society and not caring to protect inner- city residents. When called, they may not respond, which is one reason many residents feel they must be prepared to take extraordinary measures to defend themselves and their loved ones against those who are inclined to aggression. Lack of police accountability has in fact been incorporated into the status system: the person who is believed capable of "taking care of himself" is accorded a certain deference, which translates into a sense of physical and psychological control. Thus the street code emerges where the influence of the police ends and personal responsibility for one's safety is felt to begin. Exacerbated by the proliferation of drugs and easy access to guns, this volatile situation results in the ability of the street oriented minority (or those who effectively "go for bad") to dominate the public spaces." (Anderson, Code of the Street). Anderson main argument in his research is that the behavior of many youths is influenced by the street culture or code. This “code” governs how youth from the inner city will react in a violent manor when faced with impersonal attacks or any show of disrespect. Through Anderson’s study he was able to give us the day to day struggle for some inner city children, and why they were unable to express......

Words: 381 - Pages: 2

Premium Essay

Reusability of Code

...Reusability of Code To be able to compare and contrast procedural programming modules and object-oriented programming, or OOP for short, we need to understand the two different styles. Procedural programming was the most commonly used programming language early on with a top-down model. This programming module places its attention on procedures or actions, which take place within the program. A few examples of procedural programming are FORTRAN and BASIC. OOP although has become the preferred method of use. OOP focuses on objects, which are self-contained unit containing date and data operations. When it comes to the reusability of codes OOP makes this task much easier. As procedural programming is a line-by-line programming style as if to be writing out simple instructions. OOP however allows the programmer to utilize inheritance. Inheritance gives the programmer the ability to create new classes, known as subclasses, based on an existing class, known as the superclass. This ability enables the programmer to utilize the data and methods of the original class or superclass. This whole process is where the programmer is able to utilize code that already was written saving them time and eliminating the opportunity for programming errors. Another benefit to OOP over procedural programming is security and the ability to hide code. Within OOP, the programmer is able to label certain data fields as private. Once these data fields are labeled as private, their data and......

Words: 621 - Pages: 3

Premium Essay

Software Reusability

...Software reusability TERM PAPER Software reusability is generally considered a way to solve the software development crisis. When we solve a problem we try to apply the solution to similar problems because that makes our work easy and simple. Now in this paper I would like to cover important aspects of software reusability. But one thing is for sure software reusability can improve software productivity. Software reuse has become a topic of much interest in the software community due to its potential benefits, which include increased product quality and decreased product cost and schedule. The most substantial benefits derive from a product line approach, where a common set of reusable software assets act as a base for subsequent similar products in a given functional domain. The upfront investments required for software reuse are considerable, and need to be duly considered prior to attempting a software reuse initiative. 1. Introduction Software reuse is the process of implementing or updating software systems using existing software components. A good software reuse process facilitates the increase of productivity, quality, and reliability, and the decrease of costs and implementation time. An initial investment is required to start a software reuse process, but that investment pays for itself in a few reuses. In short, the development of a reuse process and repository produces a base of knowledge that improves in quality after every reuse, minimizing the......

Words: 3225 - Pages: 13

Free Essay

Code

...This  is  CS50.   Harvard  College  Fall  2010   Problem  Set  3:  The  Game  of  Fifteen     due  by  7:00pm  on  Fri  10/1     Per  the  directions  at  this  document’s  end,  submitting  this  problem  set  involves  submitting  source  code   on  cloud.cs50.net  as  well  as  filling  out  a  Web-­‐based  form  (the  latter  of  which  will  be  available  after   lecture  on  Wed  9/29),  which  may  take  a  few  minutes,  so  best  not  to  wait  until  the  very  last  minute,     lest  you  spend  a  late  day  unnecessarily.     Be  sure  that  your  code  is  thoroughly  commented   to  such  an  extent  that  lines’  functionality  is  apparent  from  comments  alone.       Goals.     •   Introduce  you  to  larger  programs  and  programs  with  multiple  source  files.   •   Empower  you  with  Makefiles.   •   Implement  a  party  favor.       Recommended  Reading.     •   Section  17  of  http://www.howstuffworks.com/c.htm.   •   Chapters  20  and  23  of  Absolute  Beginner’s ......

Words: 4248 - Pages: 17

Free Essay

Code

...States by corporations, institutions, and other organizations. For more information, please contact the Special Markets Department at the Perseus Books Group, 11 Cambridge Center, Cambridge MA 02142, or call (617) 252-5298, (800) 255-1514 or e-mail special.markets@perseusbooks.com. CIP catalog record for this book is available from the Library of Congress. ISBN-10: 0–465–03914–6 ISBN-13: 978–0–465–03914–2 06 07 08 09 / 10 9 8 7 6 5 4 3 2 1 Code version 1.0 FOR CHARLIE NESSON, WHOSE EVERY IDEA SEEMS CRAZY FOR ABOUT A YEAR. Code version 2.0 TO WIKIPEDIA, THE ONE SURPRISE THAT TEACHES MORE THAN EVERYTHING HERE. C O N T E N T S Preface to the Second Edition Preface to the First Edition Chapter 1. Code Is Law Chapter 2. Four Puzzles from Cyberspace PART I: “REGULABILITY” ix xiii 1 9 Chapter 3. Is-Ism: Is the Way It Is the Way It Must Be? Chapter 4. Architectures of Control Chapter 5. Regulating Code PART II: REGULATION BY CODE 31 38 61 Chapter 6. Cyberspaces Chapter 7. What Things Regulate Chapter 8. The Limits in Open Code PART III: LATENT AMBIGUITIES 83 120 138 Chapter 9. Translation Chapter 10. Intellectual Property Chapter 11. Privacy Chapter 12. Free Speech Chapter 13. Interlude PART IV: COMPETING SOVEREIGNS 157 169 200 233 276 Chapter 14. Sovereignty Chapter 15. Competition Among Sovereigns 281 294 PART V: RESPONSES Chapter 16. The Problems We Face Chapter 17. Responses Chapter 18. What Declan Doesn’t Get Appendix Notes......

Words: 190498 - Pages: 762

Premium Essay

Code Reusability

...Reusability of Code PRG/211 Reusability of Code When a developer is deciding to write code or a full out program, he/she must take into account the method of the code. There are many types of programming languages, but there are essentially two types of programming: procedural and object oriented (OPP). Both have their place in programming but you can also find procedural in OOP as well. But first we need to see what are the differences and similarities between the two. Structured programming consists of a level of such straightforwardness is reached that the execution is obvious to the programmer. Object-oriented programming consists of assemblage code with the data on which it operates so that this "object" can function separately of the rest of the software system. Structured programming and object-oriented programming are not exclusive from each other. You can structure the code in an object, and you can use objects to implement the modules of code in a structured program. Task vs. Data Structured programming is based around data structures and subroutines. The subroutines are where stuff actually "happens", and the data structures are simply containers for the information needed by those subroutines. Object oriented programming, on the other hand, shifts your primary focus to the data itself. Instead of asking "what do I want to do and what will I need to know to do it", you ask "what kind of things do I want to have and what can those things......

Words: 624 - Pages: 3

Free Essay

Code

... • TABLE OF CONTENTS INTRODUCTION . . . . . . . . . . . . . . . . . ix WHAT IS A BRO? ................... 1 BROCABULARY .................... 3 ORIGIN . ........................... 5 THE BRO CODE .................... 9 · · AMENDMENTS .................. 188 VIOLATIONS. . . . . . . . . . . . . . . . . . . . . 191 GLOSSARY ....................... 193 .. VII • ' • • ' ' • • • • • INTRODUCTION u .... her we know it or not, each of us lives a life governed by an internalized code of conduct. Some call it morality. Others call it religion. I call it "the Bro Code." For centuries men have attempted to follow this code with no universal understanding of what such an arrangement meant: Is it okay to hug a Bro?-'} If I'm invited to a Bro's wedding, do I really have to bring a gift?t Can I sleep with a Bro's sister or mother or both?* Now, for the first time on paper, I have recorded the rules of social decorum that Bros have practiced since the dawn of man ... if not before. The Bro Code previously existed only as an oral tradition (heh), so I have journeyed the globe to piece *Never. t Nope. ~ Dude. Come on. • • • lX ' • • together and transcribe the scattered fragments of the Bro Code, pausing only to flesh it out myself (double heh). While not intending to write a "Guide to Being a Bro," if men should treat it as such and pass this compendium of knowledge from......

Words: 4248 - Pages: 17

Premium Essay

Code

...Cleveland State University | Name: | Jadira Yacila | Course: | ACT 451: Auditing | Term: | Spring 2012 | Assignment: | Code 3 | Date: | 4/4/2012 | 1. Access the glossary (Master Glossary) to answer the following. a. What is the definition of “ordinary income” (loss) (740-270-20) Ordinary income (or loss) refers to income (or loss) from continuing operations before income taxes (or benefits) excluding significant unusual or infrequently occurring items. Extraordinary items, discontinued operations, and cumulative effects of changes in accounting principles are also excluded from this term. The term is not used in the income tax context of ordinary income versus capital gain. The meaning of unusual or infrequently occurring items is consistent with their use in the definition of the term extraordinary item. Ordinary income is income (or loss) exclusively from operations. Taxes expenses are not deducted. It does not include capital gains, or any other gain that could be infrequent or unusual. b. What is an error in previously issued financial statements? (250-10-20) An error in recognition, measurement, presentation, or disclosure in financial statements resulting from mathematical mistakes, mistakes in the application of generally accepted accounting principles (GAAP), or oversight or misuse of facts that existed at the time the financial statements were prepared. A change from an accounting principle that is not generally accepted to one that is...

Words: 1120 - Pages: 5

Premium Essay

The Reusability of a Code

...The Reusability of a Code Randy Lane March 27, 2012 The Reusability of a Code In computer science and software engineering reusability is a segment or part of a code that can be used again to add new functions with a little change or hardly any modification. Reusing if codes can reduce not only time, but also can increase that prior testing stage and use of it can reduce bugs and some code modifications when a change in code is required. The reusability of a code, many programmers know that is not easy designing and coding a module or object. When implementing a code, it can be complex and can take a long time to be done or accomplish. When it comes down to it, it makes a lot of sense to use the code as often as you can. Code reusability has actually become a very valuable part of adding efficiency and actually made it easier for programmers and computer programming itself. When making a program either you can start from scratch every time or you can use the code previously made and just add on to it. In programming information, hiding is the principal of separating the designs and or making certain decisions in a computer program can actually change. Information hiding protects other parts of the program from actually changing a lot. If the design is changed in any way then the Information hiding actually provides a stable code, which can protect the remainder of the program from the implementation. The details are most likely to......

Words: 579 - Pages: 3