Free Essay

Program Testing and Debugging

In:

Submitted By beachbum86
Words 872
Pages 4
Program Testing and Debugging
Mack Altman III
Capella University
Author Note
This paper is being submitted on April 27, 2015, for Azad Ali’s IT-FP2240 Introduction to Programming course.
Program Testing and Debugging
Introduction
The purpose of this document is to present a detailed description of the Mortgage Calculator. It will explain the application requirements, methods of handling errors within the application, and how to involve the client during the application assessment process. While the application is basic in nature, the application provides an example of work performed to establish the capabilities of its author to utilize error handling within an application.
Application Requirements
The only functional requirement of the application is to prompt the user to supply the user with their potential monthly mortgage payment. The payment should be determined by utilizing the mortgage amount, the down payment made, rate of interest on the proposed mortgage, and term of the mortgage in years. This information should be supplied by the user through prompts upon the execution of the application. In regards to non-functional requirements, the application requires the use of the stdio, math, and errno C libraries.
Application Review
Upon the initial execution of the application, all potential entries are initialized as float in case the user may provide a non-integer numerical value. Upon initial design, these were established as integers until the rate value was encountered. At that time, the values were modified to floating values. Immediately following the initialization of these values, the user is prompted with an introduction to advise the name and purpose of the application.
After the introduction, the user is prompted to enter the potential mortgage amount, down payment, interest rate, and mortgage period in years. A while() loop is used to handle each entry to ensure the user enters usable input. For example, the while() loop for the amount is initialized and will only be exited upon the amount variable being set to something aside from zero (Figure 1). The amount variable is different from the amountIn variable, which is utilized as the user’s input. The usage of the amount variable is within the application and prevents the user’s input from causing issues with the application until it is deemed usable.
Error handling is utilized each time the user enters input by utilizing different methods. While all errors could utilize one method of delivering an error, various methods were utilize to provide use case examples. In Figure 1, the fprintf() function is utilized for displaying a custom message to the user while providing the errno in parentheses. The perror() function is utilized in Figure 2 to handle the user’s input for the down payment. The error handling for the interest rate is handled a little differently than the mortgage amount by providing the string associated with the errno instead of the errno itself. This is illustrated in Figure 3. The resulting output of each of these error handlers can be seen in Figure 4.
Application Assessment
Despite the simplicity of the application, a client will always require they be involved at some point within the development lifecycle. Additionally, the involvement of the client will minimize tangents which many developers find themselves on in trying to identify ‘what the client really wants’ as opposed to ‘what the client said they wanted’. Prior to development, a meeting with the client should determine the initial requirements. After the initial application is developed and obvious errors have been removed, an additional meeting should be made to ensure all of the initial requirements have been met while bringing to the client’s attention modifications that may have been made along the way. After all deliverables have been made and a period of time has passed, there should be another meeting with the client to ensure the application is working as they had desired. This last meeting does not always occur due to change management not being a priority; however, this is an effective method of ensuring the client is satisfied and in some cases can provide profitable opportunities as the client may want something else for the application or bring up a different project the developers can assist with.
Conclusion
While there may be many methods for handling errors, there are various approaches that are made as to why one may be used over another. Some developers may feel error codes should not be displayed as the user is provided with no use; however, more technical developers may feel the error code is necessary due to the user being able to provide the error code to the developer and easing the identification of the error encountered. In the end, it will be determined by the design and development team to make these decisions for the application. Due to the limitless possibilities, the developer should have some familiarity with each approach.

Figures

Figure 1. Example of while() loop being utilized to handle user’s input for the mortgage amount.

Figure 2. Example of while() loop being utilized to handle user’s input for the down payment.

Figure 3. Example of while() loop being utilized to handle user’s input for the interest rate

Figure 4. Example of the mortgage calculator being ran and executing with each various error handler in use.

Similar Documents

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

Premium Essay

Electronic Library Card Catalog System

...Project Plan For NORSU Electronic Library Card Catalog System Researchers: Project Leader: Medura, Jess Linguaje, Ed Lorence Los Baños, Marilyn Maquiling, Marres Contents 1. Overview…………………………………………………………………………………………………………………………...3 2. Goals and scope………………………………………………………………………………………………………….….….4 2.1 Project Goals…………………………………………………………………………………………………………4 2.2Project Scope…………………………………………………………………………………………..……….……5 2.2.1 Included………………………………………………………………………………………………………….….5 2.2.2 Excluded .................................................................................................................5 3. Organization……………………………………………………………………………………………………………………….6 3.1 Organizational Boundaries and Interfaces…………………………………………………………….…...6 3.1.1 Resource Owners……………………………………………………………………………………………….6 3.1.2 Receivers…………………………………………………………………………………………………….……..6 3.1.3 Cross Functions…………………………………………………………………………………………………..7 3.2 Project Organization…………………………………………………………………………………………………..8 3.2.1 Project Manager…………………………………………………………………………………………….….8 3.2.2 Project Team……………………………………………………………………………………………………..9 4. Schedule and Budget…………………………………………………………………………………………………………10 4.1 Work Breakdown Structure…………………………………………………………………….…………...11 4.2 Schedule and Milestone………………………………………………………………………….……………12 4.3 Budget.......................................................................................................................13 4.4 Development Process…………………………………………………………………………………………...

Words: 4136 - Pages: 17

Premium Essay

Software Testing

...Software Testing Techniques Manpreet Kaur1 and Rupinder Singh2 1 Department of CSE CGC, Gharuan Mohali, India 2 CSE CGC, Gharuan Mohali, India Abstract Software testing is important to reduce errors, maintenance and overall software costs. One of the major problems in software testing area is how to get a suitable set of test cases to test a software system. We identify a number of concepts that every software engineering student and faculty should have learned. There are now many testing techniques available for generating test cases. This set should ensure maximum effectiveness with the least possible number of test cases. The main goal of this paper is to analysed and compare the testing technique to find out the best one to find out the error from the software. Keywords: Software testing; process model; testing techniques; 1. Introduction Software testing is a process or a series of processes designed to verify computer code does what it was designed to do. According to ANSI/IEEE 1059 standard [1, 2], Testing can be defined as ―A process of analyzing a software item to detect the differences between existing and required conditions (that is defects/errors/bugs) and to evaluate the features of the software item. Another more appropriate definition is this: [3] Testing is the process of executing a program with the intent of finding errors. The concept of testing is as old as coding and is change along with time. Gelperin and Hetzel [4] proposed the concept of the testing process...

Words: 4928 - Pages: 20

Free Essay

Programming Solution Proposal

...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 they can be used to construct the overall program. Modular programming is an important and beneficial approach to programming problems. They make program development easier, and they...

Words: 545 - Pages: 3

Premium Essay

Resume

...[pic] Resume For MR. ROODARDUTH RAMLOCHUN FABE, MBCS CITP Chartered IT Professional (CITP) August, 2012 Date of Birth : 27th of June, 1968 Passport No : 1140014 Marital Status : Married Summary: • 23 years of varied experience in the IT industry • Experience and demonstrated strength as a Technical Business Planner / Senior Business Analyst • Excellent administrative, consulting and communication skills Awards: | |YEAR |AWARD |REMARKS | |1. |2011 |QCF Level 7 POSTGRADUATE Diploma in Business Management (PgDip) |ASSOCIATION OF BUSINESS EXECUTIVES | |2. |2003 |British Computer Society (Honours Degree) in Information Technology |BRITISH COMPUTER SOCIETY – Graduated on | | | |(Certificate PGM, Diploma PGM, Professional Graduate Diploma, |the 4th of October 2003 | | | |Professional Project) | | |3. |2001 |Advanced Diploma in Business Administration |ASSOCIATION OF BUSINESS EXECUTIVES | Further Studies: 1. MBA (TopUp) University of Sunderland (UK) - 2012 - Global Corporate Strategy - International Business Environment - Dissertation Education: | |YEAR ...

Words: 2182 - Pages: 9

Premium Essay

Qa Test Review

...features of a software product that bear on its ability to satisfy stated or implied needs. | 2) What are STLC phases? * Software Testing Life Cycle defines the steps/stages/phases in testing of software. However, there is no fixed standard of STLC in the world and it basically varies. | * Requirements/Design Review | * Review the software requirements/design * Review Defect Reports | * Test Planning | * Gather a general idea of what needs to be tested, and plan for the tests. * Test plan * Test Estimation * Test Schedule | * Test Designing | * You design/detail your test on the basis of detailed requirements/design of the software. * Test Cases/ Test Scripts/ Test Data * Requirements Traceability Matrix | * Test Environment Setup | * You setup the test environment (server/client/network,) with the goal of replicating the end-users’ environment. | * Test Execution | * You execute your Test Cases/Scripts in the Test Environment to see whether they pass. * Test Results (Incremental) * Defect Reports | * Test Reporting | * You prepare various reports for various stakeholders. * Test Results * Test/Defect Metrics * Test closure Report | 3) Name the main Task of each STLC phase. * Software Testing Life Cycle defines the steps/stages/phases in testing of software. However, there is no fixed standard of STLC in the world and it basically varies. | 4) What is the difference between Verification...

Words: 3598 - Pages: 15

Premium Essay

Software Testing Overview

...Software Testing What is testing? Testing is the process of evaluating a system or its component(s) with the intent to find that whether it satisfies the specified requirements or not. This activity results in the actual, expected and difference between their results. In simple words testing is executing a system in order to identify any gaps, errors or missing requirements in contrary to the actual desire or requirements. Who does testing? It depends on the process and the associated stakeholders of the project(s). In the IT industry, large companies have a team with responsibilities to evaluate the developed software in the context of the given requirements. Moreover, developers also conduct testing which is called Unit Testing. In most cases, following professionals are involved in testing of a system within their respective capacities: Software Tester Software Developer Project Lead/Manager End User When to Start Testing? An early start to testing reduces the cost, time to rework and error free software that is delivered to the client. However in Software Development Life Cycle (SDLC) testing can be started from the Requirements Gathering phase and lasts till the deployment of the software. However it also depends on the development model that is being used. For example in Water fall model formal testing is conducted in the Testing phase, but in incremental model, testing is performed at the end of every increment/iteration and at the end the whole application is tested. Testing...

Words: 6175 - Pages: 25

Premium Essay

Programing Chapter 1

... An infinite loop is a flow of program logic that repeats and never ends. Software can be classified into two broad types System software and application software. Command line, 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.  ...

Words: 1631 - Pages: 7

Premium Essay

Creating a Program

...While working in my most recent job, I was in charge of a backroom for a large retail company, and quickly realized that I could solve many issues with just a few simple programs. While I know in the spectrum of business, software or hardware changes are anything but simple, though the idea itself was relatively easy. I quickly realized that while during our inventory process that we would do most mornings, that while there was a system for the corporation to keep track of where and what was being shipped, we as the store did not have much of a hint as to what we were getting or for that matter how much of certain products we had at all. Being an intermediate programmer, I generally think in terms of programs and how I could make things better and easier, not only for myself but for everyone else on my team. The first thing for me is to get a view of the big picture of things, falling in line with the first step of the programming development cycle, Analyze. This gives me a chance to make sure that the ideas that I am coming up with are not just one of those far fetched, well if we had a stick, a match and a kangaroo type of ideas, but actually legitimate ideas that could improve our work flow. It gives me a good idea of what information you would need on both ends, being your inputs and outputs. The next step is designing my personal favorite. This is where you are fixing the problem with an algorithm, or a logical sequence of steps to solve a particular problem. I am very much...

Words: 855 - Pages: 4

Free Essay

Hard-Wired Control Design

...[pic] Computer Organization and Architecture Course design report Hare-wired Control Design 1. Objective a. To master the knowledge of Computer Organization and Arthitecture courses. To clearly understanding the working principles and interconnect of various modules of the computer system especially the hard-wired controller by making a comprehensive use of the knowledge. b. To learn the basic procecures and methods of using ISP technology to design and debug. To be familiar with the designing, simulating,and debugging tools for integrated development of software. And to experience the advantages of ISP technology from the traditional ones. c. To cultive the capability of independent work on science, and to obtain the experience of project design and assembling as well as debugging. 2.Equipment 1. TEC-4 system for COA experiments. 2. A dual trace oscilloscope. 3. A logical test pen. 4. An ispLSI1032 chip. 5. IspExpert of Lattice Co. Ltd. 3.Principles and Requirements The experiment is to design a hard-wired controller with an ispLSI1032 chip for the TEC-4 platform. The controller should perform five console instructions: KRD,KWE,KLD,KRR, nine machine instructions: ADD,SUB,MUL,AND,STA,LDA,JMP, JC,STP and the interrupts. Preparations: Timng Signal Generator: MF signal is generated by a crystal oscillator (frequency 1MHz), while producing T1, T2, T3, T4, W1, W2, W3, W4 timing signal, relationship as shown below. Where W1, W2...

Words: 2111 - Pages: 9

Free Essay

Manager

...PART I. COt~UTER A PROPOSAL FOR THE DEVELOP1~NT OF NETWORKING FACILITIES AT IIASA and PART II. IIASA NETWORK PROJECT J. H. Sexton December 1975 'tlP-7 5-161 Working Papers are not intended for distribution outside of IIASA, and are solely for discussion and information purposes. The views expressed are those of the author, and do not necessarily reflect those of IIASA. Laxenburg Austria 2361 I International Institute for Applied Systems Analysis CSNOOI March 1975 A PROPOSAL FOR THE DEVELOPMENT OF COMPUTER NETWORKING FACILITIES AT IIASA As a result of meetings with Computer Institutions in Hungary and Czechoslovakia, it has become clear that there exists a concrete opportunity to establish the basis of a Computer Network available as a direct communication resource to IIASA Scientists. That there is a need for Data Communication facilities has become increasingly obvious, as a direct result of the difficulties experienced in exchanging information between IIASA and the NMO's, and between the NMO's themselves. In accordance with the aims of the project to improve and facilitate cooperation between IIASA and Home Institutions a proposal for a preliminary computer network has been cooperation with remote centres. drawn~ up, which will enable IIASA projects to make pilot studies in It will also provide the necessary experience to expand and improve such communication. The latter is important to the decentralisation of IIASA research and to...

Words: 3052 - Pages: 13

Premium Essay

Program

...value, a certain instruction is executed repeatedly. Once expression changes value repeated instruction execution ends and move to another instruction. Procedural Programing Specific the steps to be taken to reach the desired state but can also refer to a programming paradigm based on the concept of the procedure call. Procedures and routines called methods or subroutines contain a series of steps to be executed. Any procedure can be called at any time of the execution of a program, including other procedures or itself. Modular Programming A complex problem is decomposed into sub-problems to obtain very simple and relatively independent issues. For each problem is simple then write a program module properly and it simply. Each program module executes an independent working group of working groups of the other modules. If necessary modules communicate with each other through interfaces consisting of sets of parameters. Relatively independent modules allow specific operations implementation, testing, debugging and...

Words: 288 - Pages: 2

Premium Essay

Sdlc

...divide complex projects into smaller and more manageable segments or phases. The software development projects include initiation, planning, analyzing, design, programming, testing, implementation, and maintenance phases. Through the feasibility study task the system is investigated to use the existing program or to change it. Once the decision is made through the feasibility analysis the decision is made to move forward or not, which is called the “Go/No-Go” (Rainer & Turban, 2009). The system analysis examines the problem in the business and makes plans to enhance or create a new system through an information system. To make sure if the system will be able to complete the assignment is done through the systems design. This function has two aspects, which is the logical design and physical design (what and how). Programming transfers the designs into computer codes. Testing requires the system to continuously check to see if the computer codes will produce the end results that are expected. To convert old information to a new system is the implementation stage. The converting is three stages of implementation, which is direct, pilot, and phased. Once the old system is replaced and the new system is stabilized audits are performed. In addition, maintenance is done, the first type of maintenance is debugging- this is done throughout the life of the system. Updating the system is needed, which is used to record the change in the business. Finally, the system needs additions, which...

Words: 345 - Pages: 2

Free Essay

The Meaning of Psuedocode

...and Components of Pseudo-code The first part in designing a program is to understand the tasks that the program is to perform. The second part is to determine the steps that must be taken to perform the tasks. This includes creating a flow chart and using pseudo-code. A flow chart is a diagram that graphically depicts the steps that take place in a program. “Pseudo” is a combining form meaning false, unreal, or fake. So the actual word of Pseudo-code is “Fake Code”. Pseudo-code is an informal language that has no syntax rules and is not meant to be compiled or executed by the computer, but by the human. Pseudo-code typically omits details that are not essential for human understanding of the algorithm. It is specific documentation that falls between human language and computer programming. It focuses more on the readability and less on syntax. It saves time that is otherwise spent in debugging and testing codes, since it allows programmers to spot and correct errors. The first parts of a pseudo-code are to define the variables and other elements that will be used to create functionality. A flow chart should be written out to understand the steps at hand, as stated before. Parts of a flow chart include the variables, input and output. The variables being storage locations in memory for data, the output being the data is generated and displayed, and input being the data that a program receives. Computer programs typically follow these three steps: Input is received, some process...

Words: 669 - Pages: 3

Premium Essay

Sdlc Models

...on it. So by considering it a detailed analysis of the requirements had been carried out. The prevailing life-cycle-based models do not explicitly deal with changing organizational attributes during the development process. Key words: SDLC Table of Contents Introduction 4 7 Steps of Systems development Life Cycle 4 12 steps of a SDLC model… ….6 Difference between SDLC and other models……………………………………………….....7 Criteria for Choosing Right SDLC for information system…………………………………...8 Compare and contrast of 7step model and 12 steps model 9 Conclusion 9 References 10 Introduction SDLC is the detailed process of development of information systems that describes the process of planning, analysis, designing, testing, deploying, and maintenance of information systems. Various models used for creating this life cycle are Waterfall, Prototype, Incremental, and Spiral models. This life cycle is applied to hardware and software configurations or any one of them. Aken, (2008) stated “This cycle develops high quality systems to meet clients` expectations and requirements through a defined phase with scheduled time-frames and costs” in (p.332). Mainly in IT projects the SDLC is used for development with deliberate,...

Words: 1986 - Pages: 8