Free Essay

Errors in Programming

In:

Submitted By lpermenter
Words 401
Pages 2
Larquetta Permenter
IT110-1402A-01
April 23, 2014
As a programmer, we’re always trying to prepare our software to be perfect. This means no errors! Since we’re human, we can only do our best. It’s when these errors occur, how they are dealt with, error or exception handling. Understanding each type will go a long way when client acceptance testing begins.
Errors are problems in program operations usually caused because the code isn’t written correctly or a problem occurred that wasn’t addressed during the design process. According to the Board, the term exception is a reclassification of errors into a category of errors that can occur in a program but can be handled in a way that allows the program to continue operation.(Editorial Board, 2014) Dealing with errors in a well-defined way allows programmers to write code to handle errors. This is exception handling. There are pros and cons for using error and exception handling.
Exception handling enables normal code to be written and to deal with the exceptional cases code elsewhere. It also provides the means to separate the details of what to do when something out of the ordinary happens from the main logic of a program. A second advantage of exceptions is the ability to propagate error reporting up the call stack of methods which allows grouping and differentiating error type objects. In traditional programming, error detection, reporting, and handling often leads to confusing code. This presents disadvantages because you lose compile time support, the calling method must take care is testing all possible return values, and the code blends leading to cluttering. These errors can only be corrected by fixing the program. The best programs of this type forestall errors if possible, recover from them when they occur without terminating the application, or (if all else fail) gracefully terminate an affected application and save the error information to a log file.
Using the latest and greatest seems to have caught on with exception handling input or output as well as file opening and system timeouts. It wasn’t available in earlier languages but seems to have been embraced. Not only does it address users’ errors but also normal system errors can be addressed as well. In addition, the error messages can be understood by all.
References
Editorial Board. (2014). Principles of Programming. Words of Wisdom, LLC.
Additional information from http://www.tutorialspoint.com/java/java_exceptions.htm

Similar Documents

Premium Essay

Programing Chapter 1

...a location on your computer screen at which you type text entries to communicate with the computer's operating system. The major difference between the two main programming styles in use today is programmer's focus during the earliest planning stages of a project. Graphical user interface(GUI) allows users to interact with a program in a graphical environment. The process of walking through a program's logic on paper before you actually write the program is called desk-checking.  Processing data items may involve organizing or sorting them,checking them for accuracy, or performing calculations with them. Every programming language has rules governing its word usage and punctuation. Using Pseudocode involves writing down all the steps you will use in a program. Before a programmer plans the logic of the program, he or she must understand the problem. F Software can be classified into two broad types: application software and programming software.  T Every programming language has rules governing its word usage and punctuation.  T Besides the popular, comprehensive programming languages such as Java and C++, many programmers use scripting languages such as Python, Lua, Perl, and PHP.  F Professional computer programmers write programs to satisfy their own needs.  T The heart of the programming process lies in planning the program's logic.  F Once a program is completely coded, it is ready for a company or organization to use.  F A flowchart...

Words: 1631 - Pages: 7

Premium Essay

Intro to Programming Usin Java

...Introduction to Programming Using Java Course Specifications Course length: 1.0 day(s) Course Description Course Objective: You will learn the basic concepts of programming using Java as the tool for learning. Target Student: This course is intended for students with no prior academic background in a field other than computer science or programming, who wish to embark on a course of study that will prepare them for employment as professional software developers. Students who interact on a business basis with software development professionals and need to improve communication through better understanding of the concepts and terminology used by professional programmers will also benefit equally. Prerequisites: Students should be familiar with using personal computers with a mouse and keyboard. Basic typing skills are mandatory. Students should be comfortable in the use of the Windows 2000, Windows XP, Windows Vista environment, or Windows 7 environment. To ensure your success in this course, we recommend that you take the following Element K courses or have equivalent experience: Microsoft Windows Vista: Level 1Microsoft Windows XP Professional: Level 1 Course Objectives Upon successful completion of this course, students will be able to: · explore various programming concepts. · create simple programs. · use methods to define the behavior of classes. · implement the object-oriented methodology. · handle errors in a program. Course Content Lesson 1: Introduction...

Words: 323 - Pages: 2

Free Essay

Research Paper on Extreme Programming

...Bibliography 8 Statement of research problem The purpose of this study is to find out if the adoption of Extreme programming in a learning environment has improved student productivity. It is a software development process used by small teams who have rapidly changing requirements. With regard to students, all students that are studying software development modules are also faced with this problem where by the requirements are continuously changing as they get deeper within their project. This paper is to show if extreme programming is actually helping students become more productive regardless of the ever changing requirements. Context or background to the research problem In this day and age the most widely used form of agile development in software development is extreme programming which was proposed by Kent Beck in 1996. Many parameters contribute to the success of XP. Researchers concluded that using XP in an educational domain has many benefits, where they have seen that less skilled students were able to show more progress than they would have if a traditional methodology were used.(Assassa, Mathkour, & Al Dossari). XP offers a number of practices, values and principles which are advised to be adopted in order to run a software development project(Assassa et al., 2006). These values include communication, simplicity, feedback and courage. Extreme programming has four stages which are planning,...

Words: 2047 - Pages: 9

Free Essay

Quiz 1 C++

...or reversing the proper order of two words in a computer program (Syntax Error) Pictorial representation of the logical steps it takes to solve a problem (Flowchart) English-like representation of the logical steps it takes to solve a problem (Pseudocode) Used to show the correct sequence of statements (Flowlines) Preselected value that stops the execution of a program (Sentinel) Question 2 When you write a program that will run in a GUI environment, as opposed to a command-line environment, _____ some syntax is different Question 3 Which of the following is an example of a syntax error? misspelling a programming language word Question 4 Which of the following pairs of steps in the programming process is in the correct order? code the program, translate it into machine language Question 5 The major computer operations include _____. input, processing, and output Question 6 When instructions are carried out, a program runs, or ____________________. executes Question 7 The programmer’s most important task before planning the logic of a program is to _____. understand the problem Question 8 The two most commonly used tools for planning a program’s logic are _____. flowcharts and pseudocode Question 9 An English-like programming language such as Java or Visual Basic is a _____ programming language. high-level Question 10 The heart of the programming process lies in planning the program’s ____________________. logic ...

Words: 492 - Pages: 2

Premium Essay

Asdsada

...CAPITOL UNIVERSITY College of Computer Studies Introduction to Programming Activity Book Compiled by: Mark Godfrey D. Torres 2012 Introduction to Programming ii Table of Contents Weeks 1 to 3 – Creating Your First Java Classes ....................................................................................... 1 Objectives ........................................................................................................................................... 1 Summary ............................................................................................................................................ 1 The Don’ts........................................................................................................................................... 2 Key Terms ........................................................................................................................................... 3 Seatwork............................................................................................................................................. 6 Where to Save Your Files ................................................................................................................. 6 Configuring Windows to Work with the Java SE Development Kit................................................... 6 Your First Application ........................................................................................................................

Words: 4647 - Pages: 19

Premium Essay

Lg C Program

...imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system. C is the most widely used computer language. It keeps fluctuating at number one scale of popularity along with Java programming language, which is also equally popular and most widely used among modern software programmers. Audience This tutorial is designed for software programmers with a need to understand the C programming language starting from scratch. This tutorial will give you enough understanding on C programming language from where you can take yourself to higher level of expertise. Prerequisites Before proceeding with this tutorial, you should have a basic understanding of Computer Programming terminologies. A basic understanding of any of the programming languages will help you in understanding the C programming concepts and move fast on the learning track. Copyright & Disclaimer  Copyright 2014 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point...

Words: 13419 - Pages: 54

Free Essay

Forex Analyst

...ANALYSIS OF PROGRAMMING LANGUAGE PARADIGMN BY GROUP 4 (M. Sc.) CSC 801 PROGRAMMING LANGUAGE PARADIGMNS TERM PAPER SUBMITTED TO THE DEPARTMENT OF COMPUTER SCIENCE, UNIVERSITY OF LAGOS, AKOKA June, 2015. ABSTRACT This is a survey on the programming languages paradigm: Imperative, Scripting, logic, Functional, object oriented and Markup. Our survey work involves a comparative study of these six programming languages with respect to the above programming paradigm using the following criteria: secure programming practices, web application development, OOP-based abstractions, reflection, Reusability, Portability, Reliability, Readability, Availability of compilers and tools, Familiarity, Expressiveness We study these languages in the context of the above mentioned criteria and the level of support they provide for each one of them. TABLE OF CONTENT 1. OVERVIEW OF PROGRAMMING LANGUAGE PARADIGMS 1.1 INTRODUCTION 1.2 CRITERIA OF LANGUAGE COMPARISON 2. IMPERATIVE LANGUAGES 2.1 Imperative Paradigm 2.1.2 Java as an Imperative Paradigm 2.1.3 Criteria 3. SCRIPTING LANGUAGES 3.1 Scripting Paradigm 3.2 Php as an Scripting Paradigm 3.3 Criteria 4. FUNCTIONAL LANGUAGES 4.1 Functional Paradigm 3.2 Php as an Scripting Paradigm 3.3 Criteria 5.1 LOGIC LANGUAGES 5.1.1 Readability 5.1.2 Ease of Learning 5.1.3 Ease of Maintenance 5.1.4 Extensibility 5.1.5 Pedagogy 5.1.6 Portability 6.1 OBJECT ORIENTED LANGUAGES (OOL) 6.1.1 Readability 6.1.2 Ease of Learning 6.1.3 Ease...

Words: 4013 - Pages: 17

Free Essay

Pt1420 Programming Unit 10 Research & Homework

...Unit 10: Homework and Research Assignment Definition Decision Structure - allows a program to perform actions only under certain conditions. Boolean expression - expressions that can be evaluated as either True or False Iteration - is the repetition of a block of statements within a computer program. Counter-controlled repetition structure - used when a program needs to repeatedly process one or more instructions until some condition is met, at which time the loop ends. Many programming tasks are repetitive, having little variation from one item to the next.  Condition controlled - Most programming languages have constructions for repeating a loop until some condition changes. Note that some variations place the test at the start of the loop, while others have the test at the end of the loop.  Pre – test loop - the condition gets evaluated at the beginning of the loop cycle. Therefore, the body of the loop will not get executed if the condition does not hold the very first time. Post – Test loop - the loop condition gets evaluated at the end of the loop cycle. Therefore, the body of the loop will get executed at least once, regardless of the condition. This is a major difference between a pretest loop and a posttest loop. You may choose a posttest loop if the problem description justifies the body of the loop be executed at least once. Repetition Sequence/ Set of statements - A repetition structure causes a statement or set of statements to execute...

Words: 1912 - Pages: 8

Premium Essay

Software Defects

...kinds of defects that are likely to trigger warranty repairs if they reach customers. For warranty purposes, there are four general categories of software defects that are of concern because they tend to be significant in product liability litigation: 1. Errors of commission, where something is done that is wrong. A classic example at the code level would be going through a loop one time too many or branching to the wrong address. An example of this kind of error at the specification level was noted in an IBM software specification where the data format for information being transmitted was different from the format expected by the receive function of the same application. An example of this kind of problem in user manuals is frequently found in usage instructions, where the command sequence in the user manual differs from what the software really uses. Many applications are shipped with "READ MW files which explain last-minute changes that were noted after printing of manuals occurred. 2. Errors of omission, where something was left out by accident. A minor but common example for code would be omitting one of the parentheses in nested expressions. In requirements and specifications, another common error of omission is to leave out discussions of opposites. For example, a specification might say "users must enter a valid personal security code...

Words: 4836 - Pages: 20

Premium Essay

Multiuse Platforms for Applications

...Programming languages are used to give instructions to a computer to complete a task (Burd 369). Object-oriented programming languages and imperative languages are similar in this way, but go about giving instructions differently. Object-oriented programming languages (OOS), use objects called procedures to manipulate data, in other words these methods are in a predetermined location and wait for a message arrive to execute a specific task (Burd 375). That task could be calculations, changing the color of text or displaying a video. One click on a particular object and the change to data or calculations are completed. Unlike imperative languages, object-oriented languages view data and programs as two parts which comes together to make an object (Burd 375). This makes it easier to maintain and promote reusability (Shelly et al. 250). I can also not fail to mention the object-oriented languages develop interactive user interfaces for real-time programming (Burd 375). This leads me to the integrated development environment (IDE) which consists of tools needed for faster development and testing (Burd 393). Imperative languages like Pascal have to be translated to binary CPU instructions before executing any tasks. They don’t have a graphical user interface like object-oriented programming (Burd 372). Imperative languages also use an interpreter to read source code which take up an enormous amount of resources in memory and CPU requirements while executing programs (Burd 388)...

Words: 659 - Pages: 3

Premium Essay

Discrete Math

...Most people think that computer programming just recently had been created but far from that, it started for over a century. Starting from Charles Babbage’s steam driven machine named the Analytical Engine back in 1834. This idea caught the attention of a mathematician Ada Lovelace, she wrote a program to make the Analytical Engine calculate and print a sequence of numbers known as Bernoulli numbers. Because of her work with the Analytical Engine, she is considered as the first ever computer programmer. The first true computer appeared in 1943 when the U.S. Army created a computer called ENIAC that was able to calculate artillery trajectories. To give it instructions, you had to physically flip its different switches and rearrange its cables. However, physically rearranging cables and switches to reprogram a computer proved to be very tasking and clumsy. So instead of physically rearranging the computer’s wiring, computer scientists decided it would be easier to give the computer different instructions. In the old days, computers were taking up entire rooms and cost millions of dollars. Today, computers have shrunk that they are essentially nothing more than a piece of granular bar which are called the central processing unit (CPU), or processor. However in order to tell the processor what to do, you have to give it instructions written in a language that it can understand. That is where programming languages comes in. There many different computer languages and each one of them...

Words: 1364 - Pages: 6

Premium Essay

C Program

...Introduction to C Program : Define basic terminologies Describe the steps in program planning & development Describe phases in writing a program Explain the steps in C program planning & development Basic terminologies Programming: planning, scheduling or performing a task or an event  Computer Programming: process of planning a sequence of steps for a computer to follow  Computer Program/Program: list of instructions to be performed by a computer or understood by the computer  Steps in Program Planning & Development 1. 2. 3. 4. 5. Identification of the problem Problem Analysis Setting up an Algorithm Coding Running, Testing & Debugging Steps in Program Planning & Development 1. Identification of the problem knowing what the problem is Steps in Program Planning & Development 2.Problem Analysis     Review the problem & understand carefully what you are asked to do Determine what is given(input) and what result/information must be produced(output) Assign names to each input and output Determine the manner of processing that must be done on the input data to come up with desired output Steps in Program Planning & Development 3. Setting up an Algorithm Algorithm: a step-by-step process that if followed performs a specific task. This can be described in 2 ways: 1. natural language 2. graphical forms/notations What Is an Algorithm?  An algorithm is nothing more than a finite list of instructions on how to perform a task...

Words: 653 - Pages: 3

Free Essay

Python

...and completing the exercises, you will be able to: * Understand basic elements of C programming * Debug C programs * Create, compile, and test C programs Text Reference: Chapter 10 – Developing UNIX/Linux Applications in C and C++ Programming Overview A computer program is a list of instructions given to a computer to make it perform a specific task or series of tasks. A programmer communicates these instructions to the computer in a language the computer understands. Computers, however, can only operate using binary code (1’s and 0’s), which makes a computer’s language very difficult for humans to understand. The solution to this problem is to create an intermediate language that both humans and computers can understand. These are called programming languages. Programmers create a list of instructions for the computer in a programming language such as C, C++, or Java. The C Programming Language The C programming language was released in 1973. C was created by Brian Kernighan, Dennis Ritchie and Ken Thompson working at Bell Labs. Both the UNIX and Linux operating systems are written in C. The C programming language is a high-level language because the code itself is written in relatively English-like statements. In 1978, Kernighan and Ritchie wrote "The C Programming Language," still one of the best C programming books available. The list of programming instructions is known as source code. It is text-based in nature, and readable to humans (Figure...

Words: 2308 - Pages: 10

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 methods...

Words: 621 - Pages: 3

Free Essay

Programming Solution Proposal

...Programming Solution Proposal Donald L. Smith PRG/211 June 24, 2013 Jack Warner Programming Solution Proposal The McBride Financial Services Company, a part of the Virtual Organizations, needs a computer program to calculate mortgage payments in their agent field offices. The agents want to input a mortgage loan amount, an interest rate, and a number to pay off the loan into this program and have the mortgage’s monthly payments as output. In addition, agents want the program to calculate the pay-off amount of the loan for a specific year(s) or an amortization table for the mortgage. The benefits of this program are faster and more reliable than using manual calculations or an electronic calculator where they can still key in the wrong number. The program can also be ported to a company website. This website can be accessed by customers to inquire about mortgage information and thus free the agents’ time for such requests. The program development cycle is the best approach for coding a program solution. The first paragraph has done the analyzing of the problem, then comes the design phase. The requirements for this task are identified as input, output, and processing tasks. Tasks are coded into a program module. This breaking down of tasks into modules is known as modular programming. According to Torres (2012), ”Breaking down a programming project into modules makes it more manageable. These individual modules are easier to design, implement, and test. Then...

Words: 545 - Pages: 3