Research Article AUTOMATED EXCEPTION HANDLING IN SOFTWARE TESTING Dr. Anjaneyulu G.S.G.N*
|
|
- Gavin Cole
- 5 years ago
- Views:
Transcription
1 ISSN: X CODEN: IJPTFI Available Online through Research Article AUTOMATED EXCEPTION HANDLING IN SOFTWARE TESTING Dr. Anjaneyulu G.S.G.N* 1 Professor, School of Advanced Sciences, VIT University, Vellore, India. 2,3,4 B.Tech, School of Computing Sciences and Engineering, VIT University, Vellore, India. anjaneyulu.gsgn@vit.ac.in Received on Accepted on Abstract: Exception Handling is a method of developing a system to detect and deal with exceptional conditions. Exceptional Handling improves the robustness of the system. But exceptional handling increases the cost in testing phase. Earlier research on basis path generation ignored the effects of exception handling on control flow. This paper gives a method to generate basis path set based on Exception Control Flow Graph. Followed by the method this paper provides a simple sample code to show how efficiently our proposed method works. Keywords: Exception handling, Robustness, Software Testing. I. Introduction Software Testing is a very effective way to cut down the maintenance and afterwards software cost development. And if this procedure can be done automatically then it would be a very faster and efficient way to test a particular program. It is been observed that in large projects, huge amount of time in the development section is devoted in testing phase. Therefore automation is very necessary. Testing through automation is a process of writing computer programs that can generate test cases manually. Automated testing save time, money and increase test coverage. Generally, software testing tools lack in reliability, portability, scalability and applicability. Though automated software testing can be done via the following methods as Random, Goal oriented, intelligent approach and path oriented. Random testing is quick and simple but not effective. Goal oriented approach do not require path selection step but there is difficulty in selecting IJPT July-2015 Vol. 7 Issue No Page 8011
2 goal and adequate data. Intelligent approach might face the problems of high computation. The reason behind popularity of path oriented testing is its strongest path coverage method. Main problem behind path oriented test data generation is infeasible path and complexity of data types. Path oriented testing can be implemented by symbolic execution, actual value, and combined method. Conventional method of test data generation using symbolic execution collect the path predicate and then solve it with a help of a constraint solver. There are many issues of symbolic execution. Some of them are unsolvable constraint are arising, solving for infinte loops and size of symbolic expression etc. In current research, the testing of program with exception handling constructs is always separated into ormal testing and exception testing. So we need to test one program twice separately which increases the overall cost in testing phase. Considering such problems, this paper proposes a method to detect normal defect and exception defect to generate the basis path only once. II. Solution Proposing While testing a code with exception handling procedure, Exception Control Flow Graph is used to represent the structure of the code. Exception Control Flow Graph is a directed graph (which is in particular direction), which can be expressed as ECFG (Exception Control: Flow Graph ) =<X,E,Start,End>, where X is a set of nodes, E is a set of edges, Start is the unique entry or starting node and End is the unique exit node or the finish node. Each node represents a program statement or an exception exit. Each edge (x, y) represents the flow of control from statement x to statement y. A BPS is a collection of mutually independent paths through which all the paths can be constructed by linear computation. The number of the BPS equals to the number of Cyclomatic complexity (CC), which is defined to be e - n + 2, where e and n are the number of edges and nodes in the program flow graph, respectively. In case of exception Occurrence in a particular program is, what a code does is it stops it current execution and saves its state and transfers the control too the exception handler. Then it s the job of the exception handler to handle that exception and then again return back the control to the original program. In this paper the algorithm that we proposed involves three steps which are: Firstly, construct an uncompleted CFG in which there should not be any outgoing edge matching to the statement of throw, secondly, determine the type of exception in the IJPT July-2015 Vol. 7 Issue No Page 8012
3 statements that may be thrown, finally, add the outgoing edges of the statement of throw and the necessary exception nodes. II. Algorithm Input: G(P)//CFG or ECFG Output:BPS //basis path will be the output. Explanation: In the initial phase it will first reduce the graph to a simple graph (that is a graph without loops and parallel edges. (in lines 1-5). In lines 1-5 it is checking whether the input graph has a loop or not, if it has then it will make a list of all those edges which does not form a circuit( don t form a loop) and store it in an array denoted as EL and if the graph doesn t have any loops then follow the else condition and store that graph in G. Pseudo Code: Begin 1. if G has a loop then 2. EL= { e e G G-e doesn t include loop} 3. G =G-EL 4. else G =G 5. endif 6.NodeList= {x x G }// Node list is a list that makes a collection of all the nodes that are present in a graph(without loops). 7 Path = {path path is got from G by DFS}// Path is a collection of all those suitable path that are formed as a result of Depth First Search. It is because depth first search searches till the leaf node and thus a path can be selected and can be stored in a Path (array we defined) 8 while(path!=φ) // If there exists some path in in Path(array) 9. for each path in Path do // for all the paths execute this loop 10. if (path NodeList)!=φ then //the nodes and the Path(array of paths) have nodes in common then 11. for each node in Path NodeList do 12. List= List {<node,path>} // List will make a collection of all the suitable paths that could be taken in account while creating the test cases(which path needs to be followed during a program execution) and will include the nodes and path in it 13. NodeList = NodeList - {node}// delete the node from the Node List 14. endfor 15. Path= Path-path // delete the path from the path array 16. BPS= BPS {path} //Basis Path search takes into account that path 17. endif 18. endfor 19. if List!=φ then 20. for each <node, path> in List do // for each node in List array do the following steps 21. for each node s successor do // search if left out for certain paths IJPT July-2015 Vol. 7 Issue No Page 8013
4 22. get new path p //get those paths Dr. Anjaneyulu G.S.G.N* et al. International Journal Of Pharmacy & Technology 23. Path= Path {p} // update the Path array if got 24. endfor 25. List= List-<node, path> // deleting the path from the List 26 endfor 27 endif 28. for each edge in EdgeList do 29. get sp1 from Entry to edge s target node // get source node from the Entry point 30. get sp2 from edge s source node to Exit // get source node from starting edge 31. Path= Path {sp1+sp2} // add those two source pointer to the found path 32. endfor 33. endwhile 34. return BPS(P) End Sample Considered: in order to check the effectiveness our algorithm, we consider the case study in form of a simple java program. 1. import java.util.scanner; 2 3 public class testcase { 4 public static void main(string[] args) { 5 int opt, x, y, temp, r, maximum, minimum; 6 boolean next = true; 7 Scanner sc = new Scanner(System.in); 8 System.out.println("please input two integers:"); 9 x = sc.nextint(); 10 y = sc.nextint(); 11 if (x > y) { 12 maximum = x; 13 minimum = y; 14 } else { 15 maximum = y; 16 minimum = x; 17 } 18 System.out.println("options: \n1 get maximum and minimum;"\n2 get greatest common divisor;\nother exit"); 19 opt = sc.nextint(); 20 try { 21 switch (opt) { 22 case 1: 23 System.out.println("maximum of the two numbers is " + maximum); 24 System.out.println("minimum of the two numbers is +minimum); 25 break; IJPT July-2015 Vol. 7 Issue No Page 8014
5 26 case 2: 27 int a1,a2; 28 a1 = maximum; 29 a2 = minimum; 30 if (a1 == a2) 31 throw new MyException(); 32 int a3 = a1 % a2; 33 while (a3!= 0) { 34 a1 = a2; 35 a2 = a3; 36 a3 = a1 % a2; 37 } Dr. Anjaneyulu G.S.G.N* et al. International Journal Of Pharmacy & Technology 38 System.out.println(" the greatest common divisor is " + a2); 39 break; 40 default: 41 break; 42 } 43 } catch (ArithmeticException e) { 44 system out.printin( Error! the number can t be zero!!!"); 45 } catch (MyException e) { 46 System.out.println("Two numbers are equal! \n The greatest common divisor is " + max); 47 } finally { 48 System.out.println("Analysis end!"); 49 } 50 System.out.println("Program end!"); 51 } The control flow graph of the above sample program is as follows in accordance with the proposed algorithm. Fig.1 gives the CFG when normal procedure is followed no exemption is encountered, where as in Fig.2 gives the CFG when certain exceptional cases arise in a particular program. IJPT July-2015 Vol. 7 Issue No Page 8015
6 Figure.1 On the basis of the CFG drawn, the basis path can be generated and can be stated in the following way in a tabular form. As it can be seen from Table 1, compared with the Basis path set of control flow graph, we can find that there increases two paths in ECFG, VI and VII. This is because we consider the effect of exception-handling in ECFG on the control flow. What s more, the basis paths in ECFG include all the codes in the program, which implements complete converges of the codes. IV. Related Work There are two methods to generate basis path set: 1. The Baseline method proposed by McCabe, without algorithm of generating BPS, 2. Depth Finding Strategy proposed by Poole, which is implemented by recursion. In the case of control flow graph, memory overflow is easy to take place. As a result, it is not quite good for automated testing. The method proposed in this paper combines the advantages of the above two methods. Initially, determining the baseline path by Depth Finding Search(DFS), secondly, obtain the BPS by flipping branch nodes. Hence, it becomes quite easy to handle the control flow graph and thus the generation of basis path set automatically. IJPT July-2015 Vol. 7 Issue No Page 8016
7 V. Conclusion: Exception handling increases the cost of software testing and thus increases the overhead also involved in it, while improving the robustness of the software. This paper mainly proposes a method to generate the basis path taking in account the exception handling as well. But still all the paths that are found are not all feasible, hence our work will be to reduce the number of feasible paths and thus reducing the time involved in software testing. VI. References Shahid Mahmood,"A Systematic Review of Automated Test Data Generation Techniques", School of Engineering, Blekinge Institute of Technology Box 520 SE Ronneby, Sweden, October A Method to Determine a Basis Set of Paths to Perform Program Testing Joseph Poole. 4. GRAPH THEORY APPLICATIONS IN DEVELOPING SOFTWARE TEST STRATEGIES FOR NETWORKING SYSTEMS, Vladimir V. Riabov* Associate Professor, Department of Mathematics and Computer Science, River College. 5. xplanation-based generalization of infeasible path Mickaël Delahaye CEA LIST, Software Safety Laboratory Point courier if-sur- Yvette,France,mickael.delahaye@cea.fr Bernard Botella,CEA LIST Software Safety Laboratory Point courrier Gif-sur-Yvette, France,bernard.botella@cea.fr, Arnaud Gotlieb INRIA Rennes,Project Celtique,35042 Rennes Cedex,France,arnaud.gotlieb@inria.fr 6. Weakness in Code with Cyclomatic Path Analysis, Thomas J.McCabe Sr., McCabe Tecnologies, Thomas J.McCabe Jr., McCabe Software, Lance Fiondella, University of Connecticut. 7. Software Testing Methods and Techniques, Jovanović, Irena 8. Corresponding Author: Dr. Anjaneyulu G.S.G.N *, anjaneyulu.gsgn@vit.ac.in IJPT July-2015 Vol. 7 Issue No Page 8017
CSC 231 DYNAMIC PROGRAMMING HOMEWORK Find the optimal order, and its optimal cost, for evaluating the products A 1 A 2 A 3 A 4
CSC 231 DYNAMIC PROGRAMMING HOMEWORK 10-1 PROFESSOR GODFREY MUGANDA 1. Find the optimal order, and its optimal cost, for evaluating the products where A 1 A 2 A 3 A 4 A 1 is 10 4 A 2 is 4 5 A 3 is 5 20
More informationSchool of Advanced Sciences, VIT University, Vellore, India. Received on Accepted on
ISSN: 0975-766X CODEN: IJPTFI Available Online through Research Article www.ijptonline.com DEVELOPMENT OF ALTERNATE FAULT TOLERANT MINIMUM WEIGHTED SPANNING TREE USING VERTEX, EDGE CONNECTIVITY M. Yamuna*
More informationAP COMPUTER SCIENCE A
AP COMPUTER SCIENCE A CONTROL FLOW Aug 28 2017 Week 2 http://apcs.cold.rocks 1 More operators! not!= not equals to % remainder! Goes ahead of boolean!= is used just like == % is used just like / http://apcs.cold.rocks
More informationINTRODUCTION TO SOFTWARE ENGINEERING
INTRODUCTION TO SOFTWARE ENGINEERING Structural Testing d_sinnig@cs.concordia.ca Department for Computer Science and Software Engineering Introduction Testing is simple all a tester needs to do is find
More informationObject Oriented Programming Exception Handling
Object Oriented Programming Exception Handling Budditha Hettige Department of Computer Science Programming Errors Types Syntax Errors Logical Errors Runtime Errors Syntax Errors Error in the syntax of
More informationJAVA PROGRAMMING (340)
Page 1 of 8 JAVA PROGRAMMING (340) REGIONAL 2016 Production Portion: Program 1: Base K Addition (335 points) TOTAL POINTS (335 points) Judge/Graders: Please double check and verify all scores and answer
More informationPrime Generating Algorithms by Skipping Composite Divisors
Prime Generating Algorithms by Skipping Composite Divisors Neeraj Anant Pande Assistant Professor Department of Mathematics & Statistics Yeshwant Mahavidyalaya (College), Nanded-431602 Maharashtra, INDIA
More informationM. Yamuna* et al. /International Journal of Pharmacy & Technology
ISSN: 0975-766X CODEN: IJPTFI Available Online through Research Article www.ijptonline.com FINDING CRITICAL PATH OF A NETWORK USING MODIFIED DIJKSTRA S ALGORITHM Shantan Sawa, Shivangee Sabharwal, Purushottam
More informationAP CS Unit 3: Control Structures Notes
AP CS Unit 3: Control Structures Notes The if and if-else Statements. These statements are called control statements because they control whether a particular block of code is executed or not. Some texts
More informationReview Article AN ANALYSIS ON THE PERFORMANCE OF VARIOUS REPLICA ALLOCATION ALGORITHMS IN CLOUD USING MATLAB
ISSN: 0975-766X CODEN: IJPTFI Available through Online Review Article www.ijptonline.com AN ANALYSIS ON THE PERFORMANCE OF VARIOUS REPLICA ALLOCATION ALGORITHMS IN CLOUD USING MATLAB 1 P. Nagendramani*,
More informationIntroduction to Computer Science Unit 2. Notes
Introduction to Computer Science Unit 2. Notes Name: Objectives: By the completion of this packet, students should be able to describe the difference between.java and.class files and the JVM. create and
More informationCS115. Chapter 17 Exception Handling. Prof. Joe X. Zhou Department of Computer Science. To know what is exception and what is exception handling
CS115 Pi Principles i of fcomputer Science Chapter 17 Exception Handling Prof. Joe X. Zhou Department of Computer Science CS115 ExceptionHandling.1 Objectives in Exception Handling To know what is exception
More informationException Handling in Java. An Exception is a compile time / runtime error that breaks off the
Description Exception Handling in Java An Exception is a compile time / runtime error that breaks off the program s execution flow. These exceptions are accompanied with a system generated error message.
More information2.2 - Making Decisions
2.2 - Making Decisions So far we have only made programs that execute the statements in order, starting with the statements at the top of the screen and moving down. However, you can write programs that
More informationLoops. CSE 114, Computer Science 1 Stony Brook University
Loops CSE 114, Computer Science 1 Stony Brook University http://www.cs.stonybrook.edu/~cse114 1 Motivation Suppose that you need to print a string (e.g., "Welcome to Java!") a user-defined times N: N?
More informationA Method for Automated Unit Testing of C Programs
A Method for Automated Unit Testing of C Programs Duc-Anh Nguyen, Pham Ngoc Hung, Viet-Ha Nguyen VNU University of Engineering and Technology Email: {nguyenducanh, hungpn, hanv}@vnu.edu.vn Abstract This
More informationData dependent execution order data dependent control flow
Chapter 5 Data dependent execution order data dependent control flow The method of an object processes data using statements, e.g., for assignment of values to variables and for in- and output. The execution
More informationJava Errors and Exceptions. Because Murphy s Law never fails
Java Errors and Exceptions Because Murphy s Law never fails 1 Java is the most distressing thing to hit computing since MS-DOS. Alan Kay 2 Corresponding Book Sections Pearson Custom Computer Science: Chapter
More informationSequence structure. The computer executes java statements one after the other in the order in which they are written. Total = total +grade;
Control Statements Control Statements All programs could be written in terms of only one of three control structures: Sequence Structure Selection Structure Repetition Structure Sequence structure The
More informationMethods and Functions
Programming with Java Module 4 Methods and Functions Theoretical Part Contents 1 Module overview 3 2 Methods 3 2.1 Methods without return value (procedures).............. 3 2.2 Functions with return value
More informationBacktracking and Branch-and-Bound
Backtracking and Branch-and-Bound Usually for problems with high complexity Exhaustive Search is too time consuming Cut down on some search using special methods Idea: Construct partial solutions and extend
More informationSAMPLE QUESTIONS FOR DIPLOMA IN INFORMATION TECHNOLOGY; YEAR 1
FACULTY OF SCIENCE AND TECHNOLOGY SAMPLE QUESTIONS FOR DIPLOMA IN INFORMATION TECHNOLOGY; YEAR 1 ACADEMIC SESSION 2014; SEMESTER 3 PRG102D: BASIC PROGRAMMING CONCEPTS Section A Compulsory section Question
More informationMenu Driven Systems. While loops, menus and the switch statement. Mairead Meagher Dr. Siobhán Drohan. Produced by:
Menu Driven Systems While loops, menus and the switch statement Produced by: Mairead Meagher Dr. Siobhán Drohan Department of Computing and Mathematics http://www.wit.ie/ Topics list while loops recap
More informationException Handling. Sometimes when the computer tries to execute a statement something goes wrong:
Exception Handling Run-time errors The exception concept Throwing exceptions Handling exceptions Declaring exceptions Creating your own exception Ariel Shamir 1 Run-time Errors Sometimes when the computer
More informationException Handling. Run-time Errors. Methods Failure. Sometimes when the computer tries to execute a statement something goes wrong:
Exception Handling Run-time errors The exception concept Throwing exceptions Handling exceptions Declaring exceptions Creating your own exception 22 November 2007 Ariel Shamir 1 Run-time Errors Sometimes
More informationInternational Journal of Advanced Research in Computer Science and Software Engineering
Volume 2, Issue 9, September 2012 ISSN: 2277 128X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com Case Study
More informationCS61BL. Lecture 1: Welcome to CS61BL! Intro to Java and OOP Testing Error-handling
CS61BL Lecture 1: Welcome to CS61BL! Intro to Java and OOP Testing Error-handling About me Name: Edwin Liao Email: edliao@berkeley.edu Office hours: Thursday 3pm - 5pm Friday 11am - 1pm 611 Soda Or by
More informationSmart Test Case Quantifier Using MC/DC Coverage Criterion
Smart Test Case Quantifier Using MC/DC Coverage Criterion S. Shanmuga Priya 1, Sheba Kezia Malarchelvi 2 Abstract Software testing, an important phase in Software Development Life Cycle (SDLC) is a time
More informationChapter 3. Selections
Chapter 3 Selections 1 Outline 1. Flow of Control 2. Conditional Statements 3. The if Statement 4. The if-else Statement 5. The Conditional operator 6. The Switch Statement 7. Useful Hints 2 1. Flow of
More informationFor that purpose, java provides control structures that serve to specify what has to be done by our program, when and under which circumstances.
Control Structures A program is usually not limited to a linear sequence of instructions. During its process it may bifurcate, repeat code or take decisions. For that purpose, java provides control structures
More informationAsha. N* et al. International Journal of Pharmacy & Technology
ISSN: 0975-766X CODEN: IJPTFI Available Online through Research Article www.ijptonline.com CUSTOMER SEGREGATIONIN BANKINGORGANISATIONUSING KNOWLEDGE MANAGEMENT Asha. N* School of information technology,
More informationMTAT : Software Testing
MTAT.03.159: Software Testing Lecture 03: White-Box Testing (Textbook Ch. 5) Dietmar Pfahl Spring 2016 email: dietmar.pfahl@ut.ee Lecture Chapter 5 White-box testing techniques (Lab 3) Structure of Lecture
More informationCOSC 123 Computer Creativity. I/O Streams and Exceptions. Dr. Ramon Lawrence University of British Columbia Okanagan
COSC 123 Computer Creativity I/O Streams and Exceptions Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Objectives Explain the purpose of exceptions. Examine the try-catch-finally
More informationExample Program. public class ComputeArea {
COMMENTS While most people think of computer programs as a tool for telling computers what to do, programs are actually much more than that. Computer programs are written in human readable language for
More informationDIVERSITY TG Automatic Test Case Generation from Matlab/Simulink models. Diane Bahrami, Alain Faivre, Arnault Lapitre
DIVERSITY TG Automatic Test Case Generation from Matlab/Simulink models Diane Bahrami, Alain Faivre, Arnault Lapitre CEA, LIST, Laboratory of Model Driven Engineering for Embedded Systems (LISE), Point
More informationSoftware Testing Prof. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur. Lecture 13 Path Testing
Software Testing Prof. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture 13 Path Testing Welcome to this session and we will discuss about path
More information1 Short Answer (10 Points Each)
1 Short Answer (10 Points Each) 1. Write a for loop that will calculate a factorial. Assume that the value n has been input by the user and have the loop create n! and store it in the variable fact. Recall
More informationLe L c e t c ur u e e 5 To T p o i p c i s c t o o b e b e co c v o e v r e ed e Exception Handling
Course Name: Advanced Java Lecture 5 Topics to be covered Exception Handling Exception HandlingHandlingIntroduction An exception is an abnormal condition that arises in a code sequence at run time A Java
More informationIntroduction to Computer Science Unit 2. Notes
Introduction to Computer Science Unit 2. Notes Name: Objectives: By the completion of this packet, students should be able to describe the difference between.java and.class files and the JVM. create and
More informationS.Hrushikesava Raju* et al. International Journal of Pharmacy & Technology
ISSN: 0975-766X CODEN: IJPTFI Available Online through Research Article www.ijptonline.com APPLICATION OF DATA PREPROCESSING ON THE GIVEN DATA AND EFFICIENT CONSTRUCTION OF OPTIMAL BINARY SEARCH TREES
More informationA Framework for Improving the Concept of Cyclomatic Complexity in Object-Oriented Programming
A Framework for Improving the Concept of Cyclomatic Complexity in Object-Oriented Programming Thesis submitted in partial fulfillment of the requirements for the award of degree of Master of Engineering
More informationCSC System Development with Java. Exception Handling. Department of Statistics and Computer Science. Budditha Hettige
CSC 308 2.0 System Development with Java Exception Handling Department of Statistics and Computer Science 1 2 Errors Errors can be categorized as several ways; Syntax Errors Logical Errors Runtime Errors
More informationSalman Ahmed.G* et al. /International Journal of Pharmacy & Technology
ISSN: 0975-766X CODEN: IJPTFI Available Online through Research Article www.ijptonline.com A FRAMEWORK FOR CLASSIFICATION OF MEDICAL DATA USING BIJECTIVE SOFT SET Salman Ahmed.G* Research Scholar M. Tech
More informationDM550 / DM857 Introduction to Programming. Peter Schneider-Kamp
DM550 / DM857 Introduction to Programming Peter Schneider-Kamp petersk@imada.sdu.dk http://imada.sdu.dk/~petersk/dm550/ http://imada.sdu.dk/~petersk/dm857/ OBJECT-ORIENTED PROGRAMMING IN JAVA 2 Programming
More informationCCHS Math Recursion Worksheets M Heinen CS-A 12/5/2013. Recursion Worksheets Plus Page 1 of 6
CS-A // arraysol[][] = r; import java.util.scanner; public class RecursionApp { static int r; // return value static int[][] arraysol = new int[][7]; // create a solution array public static void main(string[]
More informationCOMP-202: Foundations of Programming. Lecture 3: Boolean, Mathematical Expressions, and Flow Control Sandeep Manjanna, Summer 2015
COMP-202: Foundations of Programming Lecture 3: Boolean, Mathematical Expressions, and Flow Control Sandeep Manjanna, Summer 2015 Announcements Slides will be posted before the class. There might be few
More informationChapter 11 Handling Exceptions and Events. Chapter Objectives
Chapter 11 Handling Exceptions and Events Chapter Objectives Learn what an exception is See how a try/catch block is used to handle exceptions Become aware of the hierarchy of exception classes Learn about
More informationLexical Considerations
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2005 Handout 6 Decaf Language Wednesday, September 7 The project for the course is to write a
More informationCS1020 Data Structures and Algorithms I Lecture Note #8. Exceptions Handling exceptional events
CS1020 Data Structures and Algorithms I Lecture Note #8 Exceptions Handling exceptional events Objectives Understand how to use the mechanism of exceptions to handle errors or exceptional events that occur
More informationDiscussion on Writing of Recursive Algorithm
, pp.127-134 http://dx.doi.org/10.14257/ijhit.2013.6.6.11 Discussion on Writing of Recursive Algorithm Song Jinping Computer Department, Jining Teachers College, Wulanchabu, China jnsongjinping@126.com
More informationMore Things We Can Do With It! Overview. Circle Calculations. πr 2. π = More operators and expression types More statements
More Things We Can Do With It! More operators and expression types More s 11 October 2007 Ariel Shamir 1 Overview Variables and declaration More operators and expressions String type and getting input
More informationCMPS 11 Introduction to Programming Midterm 1 Review Problems
CMPS 11 Introduction to Programming Midterm 1 Review Problems Note: The necessary material for some of these problems may not have been covered by end of class on Monday, the lecture before the exam. If
More information1) Make the flow graph of the whole program on. Test cases are always designed according to the
[Rana, 3(7: July, 2014] ISSN: 2277-9655 (ISRA, Impact Factor: 1.52 IJESRT INTERNATIONAL JOURNAL OF ENGINEERING SCIENCES & RESEARCH TECHNOLOGY A Comparative Study of Basis Path Testing and Graph Matrices
More informationControls Structure for Repetition
Controls Structure for Repetition So far we have looked at the if statement, a control structure that allows us to execute different pieces of code based on certain conditions. However, the true power
More informationArray. Array Declaration:
Array Arrays are continuous memory locations having fixed size. Where we require storing multiple data elements under single name, there we can use arrays. Arrays are homogenous in nature. It means and
More informationIntroduction to Software Design
CSI 1102 1 Abdulmotaleb El Saddik University of Ottawa School of Information Technology and Engineering (SITE) Multimedia Communications Research Laboratory (MCRLab) Distributed Collaborative Virtual Environments
More informationBBM 102 Introduction to Programming II Spring Exceptions
BBM 102 Introduction to Programming II Spring 2018 Exceptions 1 Today What is an exception? What is exception handling? Keywords of exception handling try catch finally Throwing exceptions throw Custom
More informationCHAPTER 5 GENERATING TEST SCENARIOS AND TEST CASES FROM AN EVENT-FLOW MODEL
CHAPTER 5 GENERATING TEST SCENARIOS AND TEST CASES FROM AN EVENT-FLOW MODEL 5.1 INTRODUCTION The survey presented in Chapter 1 has shown that Model based testing approach for automatic generation of test
More informationIntroduction Unit 4: Input, output and exceptions
Faculty of Computer Science Programming Language 2 Object oriented design using JAVA Dr. Ayman Ezzat Email: ayman@fcih.net Web: www.fcih.net/ayman Introduction Unit 4: Input, output and exceptions 1 1.
More informationCOE 212 Engineering Programming. Welcome to Exam II Thursday April 21, Instructors: Dr. Salim Haddad Dr. Joe Tekli Dr. Wissam F.
1 COE 212 Engineering Programming Welcome to Exam II Thursday April 21, 2016 Instructors: Dr. Salim Haddad Dr. Joe Tekli Dr. Wissam F. Fawaz Name: Student ID: Instructions: 1. This exam is Closed Book.
More informationReasoning about program behaviour Assertions
Chapter 6 Reasoning about program behaviour Assertions To analyze, verify, and describe program behaviour, it is often helpful to look at the program states, i.e., the values of the variables. The user
More informationEnhancing the Efficiency of Radix Sort by Using Clustering Mechanism
Available Online at www.ijcsmc.com International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer Science and Information Technology ISSN 2320 088X IMPACT FACTOR: 5.258 IJCSMC,
More informationExample: Monte Carlo Simulation 1
Example: Monte Carlo Simulation 1 Write a program which conducts a Monte Carlo simulation to estimate π. 1 See https://en.wikipedia.org/wiki/monte_carlo_method. Zheng-Liang Lu Java Programming 133 / 149
More informationCOMP 202 Java in one week
CONTENTS: Basics of Programming Variables and Assignment Data Types: int, float, (string) Example: Implementing a calculator COMP 202 Java in one week The Java Programming Language A programming language
More informationSchool of Computer Science CPS109 Course Notes 5 Alexander Ferworn Updated Fall 15
Table of Contents 1 INTRODUCTION... 1 2 IF... 1 2.1 BOOLEAN EXPRESSIONS... 3 2.2 BLOCKS... 3 2.3 IF-ELSE... 4 2.4 NESTING... 5 3 SWITCH (SOMETIMES KNOWN AS CASE )... 6 3.1 A BIT ABOUT BREAK... 7 4 CONDITIONAL
More informationJava How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.
Java How to Program, 10/e Copyright 1992-2015 by Pearson Education, Inc. All Rights Reserved. Data structures Collections of related data items. Discussed in depth in Chapters 16 21. Array objects Data
More informationTutorial 03. Exercise 1: CSC111 Computer Programming I
College of Computer and Information Sciences CSC111 Computer Programming I Exercise 1: Tutorial 03 Input & Output Operators Expressions A. Show the result of the following code: 1.System.out.println(2
More informationAdministration. Exceptions. Leftovers. Agenda. When Things Go Wrong. Handling Errors. CS 99 Summer 2000 Michael Clarkson Lecture 11
Administration Exceptions CS 99 Summer 2000 Michael Clarkson Lecture 11 Lab 10 due tomorrow No lab tomorrow Work on final projects Remaining office hours Rick: today 2-3 Michael: Thursday 10-noon, Monday
More informationScheduling distributed applications can be challenging in a multi-cloud environment due to the lack of knowledge
ISSN: 0975-766X CODEN: IJPTFI Available Online through Research Article www.ijptonline.com CHARACTERIZATION AND PROFILING OFSCIENTIFIC WORKFLOWS Sangeeth S, Srikireddy Sai Kiran Reddy, Viswanathan M*,
More informationAL GHURAIR UNIVERSITY College of Computing. Objectives: Examples: Text-printing program. CSC 209 JAVA I
AL GHURAIR UNIVERSITY College of Computing CSC 209 JAVA I week 2- Arithmetic and Decision Making: Equality and Relational Operators Objectives: To use arithmetic operators. The precedence of arithmetic
More informationCOE318 Lecture Notes Week 10 (Nov 7, 2011)
COE318 Software Systems Lecture Notes: Week 10 1 of 5 COE318 Lecture Notes Week 10 (Nov 7, 2011) Topics More about exceptions References Head First Java: Chapter 11 (Risky Behavior) The Java Tutorial:
More informationFlow Control. Boaz Kantor Introduction to Computer Science, Fall semester IDC Herzliya
Boaz Kantor Introduction to Computer Science, Fall semester 2010-2011 IDC Herzliya Flow Control Raistlin: This alters time. Astinus: This alters nothing...time flows on, undisturbed. Raistlin: And carries
More informationExceptions. What exceptional things might our programs run in to?
Exceptions What exceptional things might our programs run in to? Exceptions do occur Whenever we deal with programs, we deal with computers and users. Whenever we deal with computers, we know things don
More informationH212 Introduction to Software Systems Honors
Introduction to Software Systems Honors Lecture #04: Fall 2015 1/20 Office hours Monday, Wednesday: 10:15 am to 12:00 noon Tuesday, Thursday: 2:00 to 3:45 pm Office: Lindley Hall, Room 401C 2/20 Printing
More informationDm507 project 1. Emil Sjulstok Rasmussen Hold: M1
Dm507 project 1 Emil Sjulstok Rasmussen - 050391 Hold: M1 Problem 1 In assignment 1 I have used an ArrayList to store the int s from the text file, while in assignment 2 I have just used an int array.
More informationFundamentals of Object Oriented Programming
INDIAN INSTITUTE OF TECHNOLOGY ROORKEE Fundamentals of Object Oriented Programming CSN- 103 Dr. R. Balasubramanian Associate Professor Department of Computer Science and Engineering Indian Institute of
More informationAdvanced Java Concept Unit 1. Mostly Review
Advanced Java Concept Unit 1. Mostly Review Program 1. Create a class that has only a main method. In the main method create an ArrayList of Integers (remember the import statement). Add 10 random integers
More informationWentworth Institute of Technology. Engineering & Technology WIT COMP1000. Java Basics
WIT COMP1000 Java Basics Java Origins Java was developed by James Gosling at Sun Microsystems in the early 1990s It was derived largely from the C++ programming language with several enhancements Java
More informationObject-Oriented Programming
Object-Oriented Programming Java Syntax Program Structure Variables and basic data types. Industry standard naming conventions. Java syntax and coding conventions If Then Else Case statements Looping (for,
More informationComparison of Online Record Linkage Techniques
International Research Journal of Engineering and Technology (IRJET) e-issn: 2395-0056 Volume: 02 Issue: 09 Dec-2015 p-issn: 2395-0072 www.irjet.net Comparison of Online Record Linkage Techniques Ms. SRUTHI.
More informationPROGRAMMING FUNDAMENTALS
PROGRAMMING FUNDAMENTALS Q1. Name any two Object Oriented Programming languages? Q2. Why is java called a platform independent language? Q3. Elaborate the java Compilation process. Q4. Why do we write
More informationSelec%on and Decision Structures in Java: If Statements and Switch Statements CSC 121 Spring 2016 Howard Rosenthal
Selec%on and Decision Structures in Java: If Statements and Switch Statements CSC 121 Spring 2016 Howard Rosenthal Lesson Goals Understand Control Structures Understand how to control the flow of a program
More informationModule Contact: Dr Gavin Cawley, CMP Copyright of the University of East Anglia Version 1
UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2017-18 PROGRAMMING 1 CMP-4008Y Time allowed: 2 hours Answer FOUR questions. All questions carry equal weight. Notes are
More informationIntroduction to Java. Handout-3a. cs402 - Spring
Introduction to Java Handout-3a cs402 - Spring 2003 1 Exceptions The purpose of exceptions How to cause an exception (implicitely or explicitly) How to handle ( catch ) an exception within the method where
More informationCSCI-142 Exam 2 Review November 2, 2018 Presented by the RIT Computer Science Community
CSCI-142 Exam 2 Review November 2, 2018 Presented by the RIT Computer Science Community http://csc.cs.rit.edu 1. Suppose we are talking about the depth-first search (DFS) algorithm. Nodes are added to
More informationCSC 1051 Data Structures and Algorithms I
Repetition CSC 1051 Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website: www.csc.villanova.edu/~map/1051/ Some slides in this
More informationKeywords Code cloning, Clone detection, Software metrics, Potential clones, Clone pairs, Clone classes. Fig. 1 Code with clones
Volume 4, Issue 4, April 2014 ISSN: 2277 128X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com Detection of Potential
More informationA Procedure to Clip Line Segment
Vol.5, No.1 (2014), pp.9-20 http://dx.doi.org/10.14257/ijcg.2014.5.1.02 A Procedure to Clip Line Segment Bimal Kumar Ray School of Information Technology & Engineering VIT University, Vellore 632014, India
More informationCombined Assignment Operators. Flow of Control. Increment Decrement Operators. Operators Precedence (Highest to Lowest) Slide Set 05: Java Loops
Flow of control Flow of Control Program instruction execution sequence Sequential Control Structure Selection (Branching) Control Structure Repetition (Loop) Control Structure Operator Usage Relational
More informationExceptions Chapter 10. Instructor: Scott Kristjanson CMPT 125/125 SFU Burnaby, Fall 2013
Exceptions Chapter 10 Instructor: Scott Kristjanson CMPT 125/125 SFU Burnaby, Fall 2013 2 Scope Exceptions: The purpose of exceptions Exception messages The call stack trace The try-catch statement Exception
More informationCMSC 132: Object-Oriented Programming II
CMSC 132: Object-Oriented Programming II Synchronization in Java Department of Computer Science University of Maryland, College Park Multithreading Overview Motivation & background Threads Creating Java
More informationHandout 9: Imperative Programs and State
06-02552 Princ. of Progr. Languages (and Extended ) The University of Birmingham Spring Semester 2016-17 School of Computer Science c Uday Reddy2016-17 Handout 9: Imperative Programs and State Imperative
More informationM105: Introduction to Programming with Java Midterm Examination (MTA) Makeup Spring 2013 / 2014
M105: Introduction to Programming with Java Midterm Examination (MTA) Makeup Spring 2013 / 2014 Question One: Choose the correct answer and write it on the external answer booklet. 1. Java is. a. case
More informationand coverage as the nodes can act both as clients and routers. In this paper, the clients are distributed using four different
ISSN: 0975-766X CODEN: IJPTFI Available Online through Research Article www.ijptonline.com PERFORMANCE ANALYSIS FOR WIRELESS MESH NETWORK CONSIDERING DIFFERENT CLIENT DISTRIBUTION PATTERNS S.Dhivya #1,
More informationRecursion. What is Recursion? Simple Example. Repeatedly Reduce the Problem Into Smaller Problems to Solve the Big Problem
Recursion Repeatedly Reduce the Problem Into Smaller Problems to Solve the Big Problem What is Recursion? A problem is decomposed into smaller sub-problems, one or more of which are simpler versions of
More informationAP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS
AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS PAUL L. BAILEY Abstract. This documents amalgamates various descriptions found on the internet, mostly from Oracle or Wikipedia. Very little of this
More informationLECTURE 11 TEST DESIGN TECHNIQUES IV
Code Coverage Testing 1. Statement coverage testing 2. Branch coverage testing 3. Conditional coverage testing LECTURE 11 TEST DESIGN TECHNIQUES IV Code Complexity Testing 1. Cyclomatic Complexity s V
More informationMidterm Examination (MTA)
M105: Introduction to Programming with Java Midterm Examination (MTA) Spring 2013 / 2014 Question One: [6 marks] Choose the correct answer and write it on the external answer booklet. 1. Compilers and
More informationI/O Streams. program. Standard I/O. File I/O: Setting up streams from files. program. File I/O and Exceptions. Dr. Papalaskari 1
File I/O and Exceptions CSC 1051 Data Structures and Algorithms I I/O Streams Programs read information from input streams and write information to output streams Dr. Mary-Angela Papalaskari Department
More informationOptimized Query Plan Algorithm for the Nested Query
Optimized Query Plan Algorithm for the Nested Query Chittaranjan Pradhan School of Computer Engineering, KIIT University, Bhubaneswar, India Sushree Sangita Jena School of Computer Engineering, KIIT University,
More information