A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION
|
|
|
- Molly Thornton
- 9 years ago
- Views:
Transcription
1 A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION Tao Chen 1, Tarek Sobh 2 Abstract -- In this paper, a software application that features the visualization of commonly used data structures and their associated insertion and deletion operations is introduced. In addition, this software can be used to animate user-defined algorithms. Index Terms Algorithm Animation, Data Structure Visualization, JavaMy. INTRODUCTION Data Structures and Algorithms is a fundamental course in Computer Science. However, many students find it difficult because it requires abstract thinking. It would be very helpful if there was a visualization tool of data structures such as arrays, queues, stacks, trees and graphs for students to manipulate. The tool would allow students to see how an element is inserted into or deleted from different data structures, how a tree is traversed in different order (preorder, in-order, post-order, level-order), etc. Moreover, this tool would provide a simple language, by which students can write their own algorithms so that the execution of the algorithm is animated. This project is intended to create an exploration environment, in which students can learn through experimentation. This tool can be used as an effective supplement to the traditional classroom education and textbook for Data Structures and Algorithms courses. The software package presented in this paper has the following functionality. Provides complete visualization for the widely used data structures such as array, stack, queue, tree, heap, graph, etc. Provides the animation of common operations associated with the data structures, such as inserting an element into and deleting an element from array, stack, and queue Provides animation of simple user-defined algorithms. BACKGROUND The development of technologies and the evolvement of the World Wide Web have influenced education. Instructional Web sites and courses on the Web have grown dramatically. Web-based courses that consist of the syllabus, assignments and lecture notes are now widely used. Instructional Web sites that are dedicated to Data Structures and algorithms can be easily found by using Search Engines. To name a few: [1] [2] [3] [4] However, The majority of the instructional web sites explored during this project lack interactive multimedia. One of the best sites found that does contain interactivity is a course site developed for teaching Data Structures and Algorithms in Java by the Computer Science Department of Brown University [5]. This site has a collection of applets that demonstrate some commonly used data structures such as queues, stacks, and some famous algorithms such as merge sort, quick sort, etc. However, these applets are not complete and lack a common Graphical User Interface. Another good site in interactive Data Structure visualizations is developed by Duane J. Jarc in George Washington University [6]. This site provides animations in binary Trees, graphs, and sorting algorithms. But there is no animation available for algorithms that are defined by users. Algorithm animation is a type of program visualization that is mainly concerned with displaying the executions of computer algorithms. Lots of work has already been done in this field. For example, the XTANGO [7] and POLKA [8] systems developed by the Graphic, Visualization and Usability Center (GUV) at Georgia Tech are generalpurpose animation systems, which require the user to write an algorithm in the C language and register the events that the user wants to observe during the execution of the algorithm. However, these systems are implemented on top of Unix and X11 Window system, and are not portable to other platforms. In addition, we feel they are overkill for a basic Data structures and Algorithms course. Another algorithm animation system found is Zeus[9], which is developed by Digital Equipment Corporation's Systems Research Center. This system is a little complicated, requires from the user lots of effort to prepare an animation. It is targeted at more advanced application programmers. Since our software is intended to aid first year Computer Science students learning Data Structures and Algorithms, ease of use becomes our main consideration. Our approach for the user-defined algorithm animation is that the user codes the algorithm in a simple language called JavaMy, which is very similar to Java. The only effort the 1 Tao Chen, University of Bridgeport, Department of Computer Science and Engineering, Bridgeport, CT 06601, [email protected] 2 Tarek Sobh, University of Bridgeport, Department of Computer Science and Engineering, Bridgeport, CT 06601, [email protected] T1D-2
2 user needs to make is to instantiate the data structures he/she wants to observe using the observable data types provided by the software. After parsing the JavaMy algorithm file, an animation frame is created and the observable data structures are added to the frame so that the user can watch the changes made to the data structures when the algorithm is executing. SOFTWARE PACKAGE Before discussing the design of the software package, an overview of the functionality of the package is given here. The screenshots on the following pages should give an idea of how the software runs. Data Structure Visualization The observable data structures currently available in this software packages include: array, stack, queue, binary search tree, heap and graph. Array An Array stores a collection of identically typed objects, which are randomly accessible by a numeric index. The structure is shown in Figure1. FIGURE 2 STACK FIGURE 3 ARRAY-BASED QUEUE FIGURE 1 ARRAY Stack A stack is a data structure in which all access is restricted to the most recently inserted element. The stack structure is shown in Figure 2. Queue A queue is a data structure that restricts the access to the least recently inserted item. The basic operations supported by queues are enqueue and dequeue, representing insertion to the rear (back) and removal of the item at the front. Figure 3 demonstrate the arraybased queue structure. Binary Search Tree A binary search tree is a kind of binary tree where every node s left subtree has values less than the node's value, and every right subtree has greater values. The basic operations are delete, insert and find. The structure is shown in Figure 4. Binary Heap A binary heap is a complete tree where every node has a key more extreme (greater or less) than or equal to the key of its parent. In our project, a Max Heap is implemented. The allowed operations are deletemax and insert. The structure is shown in Figure 5. T1D-3
3 FIGURE 4 BINARY SEARCH TREE FIGURE 5 HEAP Graph A graph consists of a set of vertices and a set of edges that connect the vertices as shown in Figure 6. User-defined Algorithm Animation In this section we describe the steps of animating an algorithm and the details of the JavaMy language which is provided by the software and is used for visualizing the execution of the algorithm Steps To illustrate how the animation of a user-defined algorithm is done we will use a simple sorting algorithm -- bubble sort -- as an example to walk through the steps. FIGURE 6 UNDIRECTED GRAPH Bubble sort works by repeatedly moving the largest element to the highest index position of the array. The algorithm can be summarized as following. 1. Step through the array of data. 2. While stepping through, if two adjacent values are not in sorted order, then swap them. 3. When a complete pass of the data has been conducted, if any swaps have been made, then the data may still not be sorted. Goto Otherwis e, if no swaps were made on the last pass, then the data is sorted, and the algorithm is finished. Before we use the software to visualize the execution of bubble sort, we need to translate the above algorithm into JavaMy code. The details of the JavaMy language can be found in next sub-section. The bubble sort algorithm translated into JavaMy reads: public static void main(string args[]) { final int SIZE = 8; MyArray intarray = new MyArray( AnimatorFrame.ARRAY_POSITION,SIZE); for (int i=0; i<size; i++) { intarray.setvalue( ScreenPanel.getRandom(10, 100), i); for (int i=size; i>1; i--) { for (int j=0; j<i-1; j++) { if (intarray.getint(j) > intarray.getint(j+1)) intarray.swap(j, j+1); The first step is to write the algorithm. The user can use any text editor to enter and edit the algorithm. To make it easy to use, the software provides a simple built-in code editor. By clicking File->New menu item, the user can enter the code into the text field. T1D-4
4 The second step is to save the entered algorithm into a file by clicking File->Save as menu item as shown in Figure 7. FIGURE 10 PARSED AND COMPILED SUCCESSFULLY FIGURE 8 SAVE ALGOIRTHM FILE After saving the file, the user can parse it by clicking Build->Compile menu item as in Figure 9. Then the user can click Build->Run menu item to watch the animation. The animation frame is shown in Figure 11. The animation frame consists of the animation canvas, the user algorithm text field, and the animation control panel. The animation canvas is where the data structures used in the algorithm are displayed. The userdefined algorithm coded in JavaMy language is displayed in the right hand text field. The control panel can be used to control the animation. The user can choose to run the algorithm animation either continuously or step by step by clicking the radio button labeled Continuous or Single Step. The animation speed can be changed by clicking the slider bar. FIGURE 9 PARSE AND COMPILE ALGORITHM FILE If the file is edited using another editor, the user can load the algorithm file by first clicking the File -> Open menu item, then finding the file name in the File Open dialogue. If no error occurs during the parsing process, the resulting Java file will be compiled. If errors occur during the parsing or compilation process, the errors will be displayed on the text area on the bottom of the window. The user can then go back to the algorithm file and make necessary corrections. If the file is parsed and compiled successfully, a corresponding message will be displayed as shown in Figure 10. FIGURE 11 ANIMATION FRAME OF BUBBLE SORT JavaMy and Algorithm Coding As mentioned earlier, JavaMy is the language used to code the user-defined algorithm. The syntax of JavaMy is similar to Java. The difference is in the program constructs. Every program in Java consists of at least one class definition. When the class definition is saved in a file, the file name T1D-5
5 must be the class name followed by the.java file name extension. However, in JavaMy the user does not need to define a class, the coded algorithm is put into the main() method. That is, the user algorithm file always starts with public static void main(string args[]) Moreover, the algorithm file can be named in anyway the user wants. However, the file name extension.javamy is recommended to separate the algorithm file coded in JavaMy from other files. When coding the algorithm, the user is allowed to make a decision regarding which of the data structures used in the algorithm he/she wants to observe, and use the set of the observable data types provided by the software to define these data structures. All the observable data types are named by adding the prefix My to the corresponding normal data types. For instance, the observable array is named MyArray, and the queue is named MyQueue, etc. The data structure objects that do not interest the user can be instantiated by the data types provided by Java API. The software also provides some helper Java classes such as DrawableString, which can be used to add labels, explanations and other useful information to the Animation Frame. All the available observable data type classes, helper classes and their usage can be found in the Javadoc documentation that comes with the software. In the following, a balanced symbol checking algorithm will be used as an example to demonstrate how the algorithm is coded in JavaMy language and what the final animation looks like. A balanced symbol checker is a tool to help debug compiler errors, which checks whether symbols are balanced. In other words, whether every { corresponds to a, every [ to a ], every ( to a ), and so on. The basic algorithm is stated as follows: Make an empty stack. Read tokens until the end of the input file. If the token is an opening symbol, push it onto the stack. If it is a closing symbol and if the stack is empty, report an error. Otherwise, pop the stack. If the symbol popped is not the corresponding opening symbol, then report an error. At the end of the file, if the stack is not empty, then report an error. The above algorithm coded in JavaMy is shown in the following program: /* Balanced Symbol checker is used to check whether every { corresponds to a, every [ to a ], every ( to a ). And the squence [()] is legal, but [(]) is wrong. */ public static void main(string arg[]) { String input = "{[([([()]"; char c, match; String errmsg; MyArray in = new MyArray( AnimatorFrame.ARRAY_POSITION, input.length()); MyStack pendingtokens = new MyStack( AnimatorFrame.STACK_POSITION, 0); for (int i=0; i<input.length(); i++) { in.setvalue(input.charat(i),i); for (int i=0; i<input.length(); i++) { c = in.getchar(i); switch(c) { case '(': case '{': case '[': pendingtokens.push(c); break; case ')': case '': case ']': if (pendingtokens.isempty()){ System.out.println("Extraneous " + c +" found"); else { match = pendingtokens.topchar(); pendingtokens.pop(); if (match == '(' && c!= ')' match == '{' && c!= '' match == '[' && c!= ']' ) { errmsg = "Found \"" + c + "\" does not match \""+match+"\""; JOptionPane.showMessageDialog( new JPanel(), errmsg,"error", JOptionPane.ERROR_MESSAGE); break; default: break; while (!pendingtokens.isempty()) { match = pendingtokens.topchar(); pendingtokens.pop(); errmsg = "Unmatched \"" + match +"\""; JOptionPane.showMessageDialog( new JPanel(), errmsg, "Error", JOptionPane.ERROR_MESSAGE); The program starts with multiple-line comments. The comment notation in JavaMy is the same as Java. Multiple-line comments are delimited with /* and */, and single-line comments are delimited with //. Following comments is simp ly a blank line. Blank lines, space characters and tab characters are known as white-space. Such characters are used to make the program easier to read. They are ignored by the parser. The bold line indicates the beginning of the real code of the algorithm. The three lines following the opening parentheses declare normal variables as in Java, using the data type provided by the Java programming language. The next five bold lines instantiated two observable data structures that will show on the animation frame. The first one is an array, which is used to hold the input string, that is, the string to be checked. The second one is a stack, which is used to hold the opening T1D-6
6 symbols. Here, MyArray and MyStack are used. Both of the constructors of MyArray and MyStack take two parameters. One is the Position parameter, which is used to decide the location of the data structure on the animation frame. Another parameter is the size of the array or stack. The rest of the code is the same as Java. Class MyArray and MyStack provides most of the commonly used methods, for example, setters and getters for setting and getting the values of the elements in the array, respectively, push(), pop() and methods for peeking the top element on the stack, etc. Details of those methods are described in the documentation generated by Javadoc. After parsing and compiling the algorithm successfully, we can run the animation as described in subsection The resulting animation frame is shown in Figure 12. FIGURE 12 ANIMATION FRAME OF BALANCED SYMBOL CHECKING Implementation Consequently, it was our choice. The parser is generated by two steps: (1) Run JavaCC on the grammar input file to generate a set of Java files that implement the parser and the lexer. (2) Compile all the Java files obtained in step (1). Conclusions and Future Works In this paper, we present a visualization tool designed to aid first-year computer science students learn Data Structures and Algorithms. This tool not only lets students visualize the commonly used data structures, but also allows students to write their own algorithms in a Java similar language - JavaMy, and observe the execution of the algorithms. We believe this tool will be an effective supplement to traditional instruction. Because of the time limitation, only the most commonly used data structures are implemented in this version of the software package, which include arrays, stacks, queues, binary search tree, binary heap, priority queue and undirected graph. There are two ways to add more observable data structures to this software such as directed graph, weighted graph, AVL tree, Red Black Tree, AA- tree, splay tree, hash table, etc. One way is to implement these data structures in the software. Another approach would be to develop and implement a mechanism for the software package to recognize the user-defined observable data structures, and leave the implementation to the user. This approach will allow users to use their own observable data structures, hence add more flexibility to the software. Another possible future enhancement for the software is to highlight the executing command line of the user-defined algorithm file. This would help the user to better follow the execution of the algorithm. References This software package is implemented using Java. Java is a general-purpose object-oriented language. The AWT and Swing packages of Java provide extensive components for creating Graphic User Interfaces. Moreover, its graphics capabilities are platform independent and hence portable, which makes it our natural choice for implementation. To animate a user-defined algorithm, a lexical analyzer and parser are needed. A lexical analyzer breaks an input stream of characters into tokens. A parser reads the input tokens and converts the tokens to a Java program. There are several ways to build a lexer and parser. One possibility would be to code the lexical analyzer and parser completely from scratch, implementing all string handling and checking functions, which is a very tedious and error prone process. Another method is to find a Java parser generator, which reads a grammar specification and converts it to a Java program that can recognize matches to the grammar. After intensive search, we found that JavaCC [10], a product of Sun Microsystems is currently the most popular [1] Morris, John, Programming Languages and Data Structures, [2] Cawsey, Alison, Data Structures and Algorithms, [3] Owens, Brad CS300 Data Structures and Algorithms I, [4] Cohen, Edith CS270: Combinatorial Algorithms and Data Structures, [5] Goodrich, Michael T. and Tamassia, Roberto, Data Structures and Algorithms in Java, [6] Jarc, Duane J., Interactive Data Structure Visualizations, [7] The Graphics, Visualization & Usability (GVU) Center at Georgia Tech, XTango, [8] The Graphics, Visualization & Usability (GVU) Center at Georgia Tech, Polka, [9] System Research Centers (SRC) at Compaq Computer Corporation, Algorithm Animation at SRC, [10] Sun Microsystems, JavaCC The Java Parser Generator, parser generator for use with Java applications. T1D-7
Java Software Structures
INTERNATIONAL EDITION Java Software Structures Designing and Using Data Structures FOURTH EDITION John Lewis Joseph Chase This page is intentionally left blank. Java Software Structures,International Edition
DATA STRUCTURES USING C
DATA STRUCTURES USING C QUESTION BANK UNIT I 1. Define data. 2. Define Entity. 3. Define information. 4. Define Array. 5. Define data structure. 6. Give any two applications of data structures. 7. Give
Questions 1 through 25 are worth 2 points each. Choose one best answer for each.
Questions 1 through 25 are worth 2 points each. Choose one best answer for each. 1. For the singly linked list implementation of the queue, where are the enqueues and dequeues performed? c a. Enqueue in
Lecture 9. Semantic Analysis Scoping and Symbol Table
Lecture 9. Semantic Analysis Scoping and Symbol Table Wei Le 2015.10 Outline Semantic analysis Scoping The Role of Symbol Table Implementing a Symbol Table Semantic Analysis Parser builds abstract syntax
UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming
UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming 1 2 Foreword First of all, this book isn t really for dummies. I wrote it for myself and other kids who are on the team. Everything
1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++
Answer the following 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ 2) Which data structure is needed to convert infix notations to postfix notations? Stack 3) The
Semantic Analysis: Types and Type Checking
Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors
A Tool for Data Structure Visualization and User-defined Algorithm Animation
A Tool for Data Structure Visualization and User-defined Algorithm Animation TAO CHEN AND TAREK SOBH Department of Computer Science and engineering University of Bridgeport Bridgeport, CT 06601, USA Abstract
Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C
Tutorial#1 Q 1:- Explain the terms data, elementary item, entity, primary key, domain, attribute and information? Also give examples in support of your answer? Q 2:- What is a Data Type? Differentiate
MAX = 5 Current = 0 'This will declare an array with 5 elements. Inserting a Value onto the Stack (Push) -----------------------------------------
=============================================================================================================================== DATA STRUCTURE PSEUDO-CODE EXAMPLES (c) Mubashir N. Mir - www.mubashirnabi.com
COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing
COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing The scanner (or lexical analyzer) of a compiler processes the source program, recognizing
JAWAA: Easy Web-Based Animation from CS 0 to Advanced CS Courses
JAWAA: Easy Web-Based Animation from CS 0 to Advanced CS Courses Ayonike Akingbade, Thomas Finley, Diana Jackson, Pretesh Patel, and Susan H. Rodger Department of Computer Science Duke University Durham,
Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C
Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection
Data Structure [Question Bank]
Unit I (Analysis of Algorithms) 1. What are algorithms and how they are useful? 2. Describe the factor on best algorithms depends on? 3. Differentiate: Correct & Incorrect Algorithms? 4. Write short note:
Syllabus for CS 134 Java Programming
- Java Programming Syllabus Page 1 Syllabus for CS 134 Java Programming Computer Science Course Catalog 2000-2001: This course is an introduction to objectoriented programming using the Java language.
Chapter 3: Restricted Structures Page 1
Chapter 3: Restricted Structures Page 1 1 2 3 4 5 6 7 8 9 10 Restricted Structures Chapter 3 Overview Of Restricted Structures The two most commonly used restricted structures are Stack and Queue Both
6.1. Example: A Tip Calculator 6-1
Chapter 6. Transition to Java Not all programming languages are created equal. Each is designed by its creator to achieve a particular purpose, which can range from highly focused languages designed for
03 - Lexical Analysis
03 - Lexical Analysis First, let s see a simplified overview of the compilation process: source code file (sequence of char) Step 2: parsing (syntax analysis) arse Tree Step 1: scanning (lexical analysis)
PES Institute of Technology-BSC QUESTION BANK
PES Institute of Technology-BSC Faculty: Mrs. R.Bharathi CS35: Data Structures Using C QUESTION BANK UNIT I -BASIC CONCEPTS 1. What is an ADT? Briefly explain the categories that classify the functions
Moving from CS 61A Scheme to CS 61B Java
Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you
5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.
1. The advantage of.. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists. [A] Lists [B] Linked Lists [A] Trees [A] Queues 2. The
1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D.
1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D. base address 2. The memory address of fifth element of an array can be calculated
Converting a Number from Decimal to Binary
Converting a Number from Decimal to Binary Convert nonnegative integer in decimal format (base 10) into equivalent binary number (base 2) Rightmost bit of x Remainder of x after division by two Recursive
Visualising Java Data Structures as Graphs
Visualising Java Data Structures as Graphs John Hamer Department of Computer Science University of Auckland [email protected] John Hamer, January 15, 2004 ACE 2004 Visualising Java Data Structures
Parsing Technology and its role in Legacy Modernization. A Metaware White Paper
Parsing Technology and its role in Legacy Modernization A Metaware White Paper 1 INTRODUCTION In the two last decades there has been an explosion of interest in software tools that can automate key tasks
Content Author's Reference and Cookbook
Sitecore CMS 6.5 Content Author's Reference and Cookbook Rev. 110621 Sitecore CMS 6.5 Content Author's Reference and Cookbook A Conceptual Overview and Practical Guide to Using Sitecore Table of Contents
Virtual Machines as an Aid in Teaching Computer Concepts
Virtual Machines as an Aid in Teaching Computer Concepts Ola Ågren Department of Computing Science Umeå University SE-901 87 Umeå, SWEDEN E-mail: [email protected] Abstract A debugger containing a set
Binary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R
Binary Search Trees A Generic Tree Nodes in a binary search tree ( B-S-T) are of the form P parent Key A Satellite data L R B C D E F G H I J The B-S-T has a root node which is the only node whose parent
Introduction to Data Structures
Introduction to Data Structures Albert Gural October 28, 2011 1 Introduction When trying to convert from an algorithm to the actual code, one important aspect to consider is how to store and manipulate
Problem Solving. Software Engineering. Behavior. OCD in a Nutshell. Behavior. Objects Operations Algorithm. Object-Centered Design
Software Engineering (Chap. 1) Object-Centered Design Problem Solving Let s solve this temperature-conversion problem: Write a program that, given a temperature in Celsius, displays that temperature in
Java 6 'th. Concepts INTERNATIONAL STUDENT VERSION. edition
Java 6 'th edition Concepts INTERNATIONAL STUDENT VERSION CONTENTS PREFACE vii SPECIAL FEATURES xxviii chapter i INTRODUCTION 1 1.1 What Is Programming? 2 J.2 The Anatomy of a Computer 3 1.3 Translating
Common Data Structures
Data Structures 1 Common Data Structures Arrays (single and multiple dimensional) Linked Lists Stacks Queues Trees Graphs You should already be familiar with arrays, so they will not be discussed. Trees
Java Application Developer Certificate Program Competencies
Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle
Computing Concepts with Java Essentials
2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Computing Concepts with Java Essentials 3rd Edition Cay Horstmann
First Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science
First Java Programs V. Paúl Pauca Department of Computer Science Wake Forest University CSC 111D Fall, 2015 Hello World revisited / 8/23/15 The f i r s t o b l i g a t o r y Java program @author Paul Pauca
CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) 3 4 4 7 5 9 6 16 7 8 8 4 9 8 10 4 Total 92.
Name: Email ID: CSE 326, Data Structures Section: Sample Final Exam Instructions: The exam is closed book, closed notes. Unless otherwise stated, N denotes the number of elements in the data structure
CompuScholar, Inc. Alignment to Utah's Computer Programming II Standards
CompuScholar, Inc. Alignment to Utah's Computer Programming II Standards Course Title: TeenCoder: Java Programming Course ISBN: 978 0 9887070 2 3 Course Year: 2015 Note: Citation(s) listed may represent
Compiler Construction
Compiler Construction Regular expressions Scanning Görel Hedin Reviderad 2013 01 23.a 2013 Compiler Construction 2013 F02-1 Compiler overview source code lexical analysis tokens intermediate code generation
Lab 1A. Create a simple Java application using JBuilder. Part 1: make the simplest Java application Hello World 1. Start Jbuilder. 2.
Lab 1A. Create a simple Java application using JBuilder In this lab exercise, we ll learn how to use a Java integrated development environment (IDE), Borland JBuilder 2005, to develop a simple Java application
C Compiler Targeting the Java Virtual Machine
C Compiler Targeting the Java Virtual Machine Jack Pien Senior Honors Thesis (Advisor: Javed A. Aslam) Dartmouth College Computer Science Technical Report PCS-TR98-334 May 30, 1998 Abstract One of the
CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team
CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team Lecture Summary In this lecture, we learned about the ADT Priority Queue. A
Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.
Working with Tables in Microsoft Word The purpose of this document is to lead you through the steps of creating, editing and deleting tables and parts of tables. This document follows a tutorial format
Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA)
České vysoké učení technické v Praze Fakulta elektrotechnická Návrh Uživatelského Rozhraní X36NUR Editors Comparison (NetBeans IDE, Eclipse, ) May 5, 2008 Goal and purpose of test Purpose of this test
Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives
Introduction to Programming and Algorithms Module 1 CS 146 Sam Houston State University Dr. Tim McGuire Module Objectives To understand: the necessity of programming, differences between hardware and software,
Chapter 14 The Binary Search Tree
Chapter 14 The Binary Search Tree In Chapter 5 we discussed the binary search algorithm, which depends on a sorted vector. Although the binary search, being in O(lg(n)), is very efficient, inserting a
Binary Trees and Huffman Encoding Binary Search Trees
Binary Trees and Huffman Encoding Binary Search Trees Computer Science E119 Harvard Extension School Fall 2012 David G. Sullivan, Ph.D. Motivation: Maintaining a Sorted Collection of Data A data dictionary
Stacks. Data Structures and Data Types. Collections
Data Structures and Data Types Data types Set values. Set operations on those values. Some are built in to Java: int, double, char,... Most are not: Complex, Picture, Charge, Stack, Queue, Graph,... Data
MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.
Exam Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1) The JDK command to compile a class in the file Test.java is A) java Test.java B) java
MicroStrategy Desktop
MicroStrategy Desktop Quick Start Guide MicroStrategy Desktop is designed to enable business professionals like you to explore data, simply and without needing direct support from IT. 1 Import data from
INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY
INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY A PATH FOR HORIZING YOUR INNOVATIVE WORK A REVIEW ON THE USAGE OF OLD AND NEW DATA STRUCTURE ARRAYS, LINKED LIST, STACK,
Binary Heap Algorithms
CS Data Structures and Algorithms Lecture Slides Wednesday, April 5, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks [email protected] 2005 2009 Glenn G. Chappell
CSCI 3136 Principles of Programming Languages
CSCI 3136 Principles of Programming Languages Faculty of Computer Science Dalhousie University Winter 2013 CSCI 3136 Principles of Programming Languages Faculty of Computer Science Dalhousie University
Compiler Construction
Compiler Construction Lecture 1 - An Overview 2003 Robert M. Siegfried All rights reserved A few basic definitions Translate - v, a.to turn into one s own language or another. b. to transform or turn from
Heaps & Priority Queues in the C++ STL 2-3 Trees
Heaps & Priority Queues in the C++ STL 2-3 Trees CS 3 Data Structures and Algorithms Lecture Slides Friday, April 7, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks
10CS35: Data Structures Using C
CS35: Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C OBJECTIVE: Learn : Usage of structures, unions - a conventional tool for handling a
CHAPTER 4 ESSENTIAL DATA STRUCTRURES
CHAPTER 4 ESSENTIAL DATA STRUCTURES 72 CHAPTER 4 ESSENTIAL DATA STRUCTRURES In every algorithm, there is a need to store data. Ranging from storing a single value in a single variable, to more complex
Compiler I: Syntax Analysis Human Thought
Course map Compiler I: Syntax Analysis Human Thought Abstract design Chapters 9, 12 H.L. Language & Operating Sys. Compiler Chapters 10-11 Virtual Machine Software hierarchy Translator Chapters 7-8 Assembly
The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1
The Java Series Java Essentials I What is Java? Basic Language Constructs Slide 1 What is Java? A general purpose Object Oriented programming language. Created by Sun Microsystems. It s a general purpose
GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. Course Curriculum. DATA STRUCTURES (Code: 3330704)
GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT Course Curriculum DATA STRUCTURES (Code: 3330704) Diploma Programme in which this course is offered Semester in which offered Computer Engineering,
CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013
Oct 4, 2013, p 1 Name: CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013 1. (max 18) 4. (max 16) 2. (max 12) 5. (max 12) 3. (max 24) 6. (max 18) Total: (max 100)
STATGRAPHICS Online. Statistical Analysis and Data Visualization System. Revised 6/21/2012. Copyright 2012 by StatPoint Technologies, Inc.
STATGRAPHICS Online Statistical Analysis and Data Visualization System Revised 6/21/2012 Copyright 2012 by StatPoint Technologies, Inc. All rights reserved. Table of Contents Introduction... 1 Chapter
Sample Questions Csci 1112 A. Bellaachia
Sample Questions Csci 1112 A. Bellaachia Important Series : o S( N) 1 2 N N i N(1 N) / 2 i 1 o Sum of squares: N 2 N( N 1)(2N 1) N i for large N i 1 6 o Sum of exponents: N k 1 k N i for large N and k
Step 2: Headings and Subheadings
Step 2: Headings and Subheadings This PDF explains Step 2 of the step-by-step instructions that will help you correctly format your ETD to meet UCF formatting requirements. Step 2 shows you how to set
Installing Java. Table of contents
Table of contents 1 Jargon...3 2 Introduction...4 3 How to install the JDK...4 3.1 Microsoft Windows 95... 4 3.1.1 Installing the JDK... 4 3.1.2 Setting the Path Variable...5 3.2 Microsoft Windows 98...
Introduction to Programming System Design. CSCI 455x (4 Units)
Introduction to Programming System Design CSCI 455x (4 Units) Description This course covers programming in Java and C++. Topics include review of basic programming concepts such as control structures,
Lecture 5: Java Fundamentals III
Lecture 5: Java Fundamentals III School of Science and Technology The University of New England Trimester 2 2015 Lecture 5: Java Fundamentals III - Operators Reading: Finish reading Chapter 2 of the 2nd
Introduction to Microsoft Access 2003
Introduction to Microsoft Access 2003 Zhi Liu School of Information Fall/2006 Introduction and Objectives Microsoft Access 2003 is a powerful, yet easy to learn, relational database application for Microsoft
Binary Search Trees (BST)
Binary Search Trees (BST) 1. Hierarchical data structure with a single reference to node 2. Each node has at most two child nodes (a left and a right child) 3. Nodes are organized by the Binary Search
Introduction to Object-Oriented Programming
Introduction to Object-Oriented Programming Programs and Methods Christopher Simpkins [email protected] CS 1331 (Georgia Tech) Programs and Methods 1 / 8 The Anatomy of a Java Program It is customary
DATA 301 Introduction to Data Analytics Microsoft Excel VBA. Dr. Ramon Lawrence University of British Columbia Okanagan
DATA 301 Introduction to Data Analytics Microsoft Excel VBA Dr. Ramon Lawrence University of British Columbia Okanagan [email protected] DATA 301: Data Analytics (2) Why Microsoft Excel Visual Basic
MS WORD 2007 (PC) Macros and Track Changes Please note the latest Macintosh version of MS Word does not have Macros.
MS WORD 2007 (PC) Macros and Track Changes Please note the latest Macintosh version of MS Word does not have Macros. Record a macro 1. On the Developer tab, in the Code group, click Record Macro. 2. In
Binary Search Trees CMPSC 122
Binary Search Trees CMPSC 122 Note: This notes packet has significant overlap with the first set of trees notes I do in CMPSC 360, but goes into much greater depth on turning BSTs into pseudocode than
CSE373: Data Structures and Algorithms Lecture 1: Introduction; ADTs; Stacks/Queues. Linda Shapiro Spring 2016
CSE373: Data Structures and Algorithms Lecture 1: Introduction; ADTs; Stacks/Queues Linda Shapiro Registration We have 180 students registered and others who want to get in. If you re thinking of dropping
International Journal of Software and Web Sciences (IJSWS) www.iasir.net
International Association of Scientific Innovation and Research (IASIR) (An Association Unifying the Sciences, Engineering, and Applied Research) ISSN (Print): 2279-0063 ISSN (Online): 2279-0071 International
Management Information Systems 260 Web Programming Fall 2006 (CRN: 42459)
Management Information Systems 260 Web Programming Fall 2006 (CRN: 42459) Class Time: 6:00 8:05 p.m. (T,Th) Venue: WSL 5 Web Site: www.pbvusd.net/mis260 Instructor Name: Terrell Tucker Office: BDC 127
WA2099 Introduction to Java using RAD 8.0 EVALUATION ONLY. Student Labs. Web Age Solutions Inc.
WA2099 Introduction to Java using RAD 8.0 Student Labs Web Age Solutions Inc. 1 Table of Contents Lab 1 - The HelloWorld Class...3 Lab 2 - Refining The HelloWorld Class...20 Lab 3 - The Arithmetic Class...25
Qlik REST Connector Installation and User Guide
Qlik REST Connector Installation and User Guide Qlik REST Connector Version 1.0 Newton, Massachusetts, November 2015 Authored by QlikTech International AB Copyright QlikTech International AB 2015, All
Lab Experience 17. Programming Language Translation
Lab Experience 17 Programming Language Translation Objectives Gain insight into the translation process for converting one virtual machine to another See the process by which an assembler translates assembly
Introduction to Java Applications. 2005 Pearson Education, Inc. All rights reserved.
1 2 Introduction to Java Applications 2.2 First Program in Java: Printing a Line of Text 2 Application Executes when you use the java command to launch the Java Virtual Machine (JVM) Sample program Displays
An Overview of Java. overview-1
An Overview of Java overview-1 Contents What is Java Major Java features Java virtual machine Java programming language Java class libraries (API) GUI Support in Java Networking and Threads in Java overview-2
Gadget: A Tool for Extracting the Dynamic Structure of Java Programs
Gadget: A Tool for Extracting the Dynamic Structure of Java Programs Juan Gargiulo and Spiros Mancoridis Department of Mathematics & Computer Science Drexel University Philadelphia, PA, USA e-mail: gjgargiu,smancori
Java CPD (I) Frans Coenen Department of Computer Science
Java CPD (I) Frans Coenen Department of Computer Science Content Session 1, 12:45-14:30 (First Java Programme, Inheritance, Arithmetic) Session 2, 14:45-16:45 (Input and Programme Constructs) Materials
Data Structures and Data Manipulation
Data Structures and Data Manipulation What the Specification Says: Explain how static data structures may be used to implement dynamic data structures; Describe algorithms for the insertion, retrieval
tools that make every developer a quality expert
tools that make every developer a quality expert Google: www.google.com Copyright 2006-2010, Google,Inc.. All rights are reserved. Google is a registered trademark of Google, Inc. and CodePro AnalytiX
Android Studio Application Development
Android Studio Application Development Belén Cruz Zapata Chapter No. 4 "Using the Code Editor" In this package, you will find: A Biography of the author of the book A preview chapter from the book, Chapter
Microsoft Excel 2010 Part 3: Advanced Excel
CALIFORNIA STATE UNIVERSITY, LOS ANGELES INFORMATION TECHNOLOGY SERVICES Microsoft Excel 2010 Part 3: Advanced Excel Winter 2015, Version 1.0 Table of Contents Introduction...2 Sorting Data...2 Sorting
Quick Start Guide. Microsoft Publisher 2013 looks different from previous versions, so we created this guide to help you minimize the learning curve.
Quick Start Guide Microsoft Publisher 2013 looks different from previous versions, so we created this guide to help you minimize the learning curve. Quick Access Toolbar Add your favorite commands to the
Excel 2007 A Beginners Guide
Excel 2007 A Beginners Guide Beginner Introduction The aim of this document is to introduce some basic techniques for using Excel to enter data, perform calculations and produce simple charts based on
Programming in Access VBA
PART I Programming in Access VBA In this part, you will learn all about how Visual Basic for Applications (VBA) works for Access 2010. A number of new VBA features have been incorporated into the 2010
Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.
Handout 1 CS603 Object-Oriented Programming Fall 15 Page 1 of 11 Handout 1 Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Java
Pseudo code Tutorial and Exercises Teacher s Version
Pseudo code Tutorial and Exercises Teacher s Version Pseudo-code is an informal way to express the design of a computer program or an algorithm in 1.45. The aim is to get the idea quickly and also easy
Ordered Lists and Binary Trees
Data Structures and Algorithms Ordered Lists and Binary Trees Chris Brooks Department of Computer Science University of San Francisco Department of Computer Science University of San Francisco p.1/62 6-0:
core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt
core. 2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Volume I - Fundamentals Seventh Edition CAY S. HORSTMANN GARY
This lecture. Abstract data types Stacks Queues. ADTs, Stacks, Queues 1. 2004 Goodrich, Tamassia
This lecture Abstract data types Stacks Queues ADTs, Stacks, Queues 1 Abstract Data Types (ADTs) An abstract data type (ADT) is an abstraction of a data structure An ADT specifies: Data stored Operations
Making Visio Diagrams Come Alive with Data
Making Visio Diagrams Come Alive with Data An Information Commons Workshop Making Visio Diagrams Come Alive with Data Page Workshop Why Add Data to A Diagram? Here are comparisons of a flow chart with
SPSS: Getting Started. For Windows
For Windows Updated: August 2012 Table of Contents Section 1: Overview... 3 1.1 Introduction to SPSS Tutorials... 3 1.2 Introduction to SPSS... 3 1.3 Overview of SPSS for Windows... 3 Section 2: Entering
1.00 Lecture 35. Data Structures: Introduction Stacks, Queues. Reading for next time: Big Java: 15.1-15.3. Data Structures
1.00 Lecture 35 Data Structures: Introduction Stacks, Queues Reading for next time: Big Java: 15.1-15.3 Data Structures Set of reusable classes used in algorithms, simulations, operating systems, applications
