Mining framework concepts from application code
|
|
- Anissa Harrell
- 6 years ago
- Views:
Transcription
1 Mining framework concepts from application code Steven She Generative Software Developement Lab August 19, 2009 Steven She Mining framework concepts from application code 1/22
2 Outline 1 Introduction 2 Mining for Framework Concepts 3 Conclusions Steven She Mining framework concepts from application code 2/22
3 Problem - Java Applet import javaappletapplet; public class HelloApplet extends Applet { Steven She Mining framework concepts from application code 3/22
4 Problem - Java Applet import javaxswingjapplet; public class HelloApplet extends JApplet { Steven She Mining framework concepts from application code 3/22
5 Problem - Java Applet import javaxswingjapplet; public class HelloApplet extends JApplet { public void init() { showstatus("hello, world!"); Steven She Mining framework concepts from application code 3/22
6 Problem - Java Applet import javaxswingjapplet; import javaawteventkeylistener; public class HelloApplet extends JApplet { KeyListener keylist = new KeyListener() { public void keytyped(keyevent e) { /* Do something */ public void keypressed(keyevent e) { public void keyreleased(keyevent e) { public void init() { showstatus("hello, world!"); Steven She Mining framework concepts from application code 3/22
7 Problem - Java Applet import javaxswingjapplet; import javaawteventkeylistener; public class HelloApplet extends JApplet { KeyListener keylist = new KeyListener() { public void keytyped(keyevent e) { /* Do something */ public void keypressed(keyevent e) { public void keyreleased(keyevent e) { public void init() { showstatus("hello, world!"); addkeylistener(keylist); Steven She Mining framework concepts from application code 3/22
8 Problem - Java Applet import javaxswingjapplet; import javaawteventkeylistener; public class HelloApplet extends JApplet { KeyListener keylist = new KeyListener() { public void keytyped(keyevent e) { /* Do something */ public void keypressed(keyevent e) { public void keyreleased(keyevent e) { public void init() { showstatus("hello, world!"); addkeylistener(keylist); removekeylistener(keylist); Steven She Mining framework concepts from application code 3/22
9 Problem - Java Applet import javaxswingjapplet; import javaawteventkeylistener; public class HelloApplet extends JApplet { KeyListener keylist = new KeyListener() { public void keytyped(keyevent e) { /* Do something */ public void keypressed(keyevent e) { public void keyreleased(keyevent e) { public void init() { showstatus("hello, world!"); addkeylistener(keylist); public void destroy() { removekeylistener(keylist); Steven She Mining framework concepts from application code 3/22
10 Framework-Specific Modelling Languages Framework uses Application 0 M Antkiewicz, T Tonelli Bartolomei, K Czarnecki Steven She Mining framework concepts from application code 4/22
11 Framework-Specific Modelling Languages FSML formalizes Framework uses Application 0 M Antkiewicz, T Tonelli Bartolomei, K Czarnecki Steven She Mining framework concepts from application code 4/22
12 Framework-Specific Modelling Languages FSML formalizes Framework conforms to uses Framework-specific Model represents Application 0 M Antkiewicz, T Tonelli Bartolomei, K Czarnecki Steven She Mining framework concepts from application code 4/22
13 Applet FSML Applet FSML [11] name (String)![11] extendsapplet [01] extendsjapplet [0 ] registerskeylistener! 1-1 [01] asthis [01] asafield [11] listenerfield (String) [11] typedkeylistener [11] initialized [11] deregisters class name extends Applet extends JApplet calls addkeylistener( ) parameter is a field field name typed KeyListener( ) assigned an object calls removekeylistener( ) [0 ] showsstatus [11] message (String) calls showsstatus( ) parameter value Steven She Mining framework concepts from application code 5/22
14 Applet FSML Applet FSML [11] name (String)![11] extendsapplet [01] extendsjapplet [0 ] registerskeylistener! 1-1 [01] asthis [01] asafield [11] listenerfield (String) [11] typedkeylistener [11] initialized [11] deregisters class name extends Applet extends JApplet calls addkeylistener( ) parameter is a field field name typed KeyListener( ) assigned an object calls removekeylistener( ) [0 ] showsstatus [11] message (String) calls showsstatus( ) parameter value Steven She Mining framework concepts from application code 5/22
15 Forward & Reverse Model Code Applet Instance name ``HelloApplet'' extendsapplet extendsjapplet x registerskeylistener x group asthis x asafield x listenerfield (String) x typedkeylistener x initialized x deregisters x showsstatus message ``Hello, world!'' Steven She Mining framework concepts from application code 6/22
16 Forward & Reverse Model Code Applet Instance name ``HelloApplet'' extendsapplet extendsjapplet x registerskeylistener x group asthis x asafield x listenerfield (String) x typedkeylistener x initialized x deregisters x showsstatus message ``Hello, world!'' public class HelloApplet extends Applet { public void init() { showstatus("hello, world!"); Steven She Mining framework concepts from application code 6/22
17 Forward & Reverse Model Code Applet Instance name ``HelloApplet'' extendsapplet extendsjapplet x registerskeylistener x group asthis x asafield listenerfield (String) typedkeylistener initialized x deregisters x showsstatus message ``Hello, world!'' public class HelloApplet extends Applet { KeyListener keylist ; public void init() { showstatus("hello, world!"); addkeylistener(keylist); Steven She Mining framework concepts from application code 6/22
18 Forward & Reverse Model Code Applet Instance name ``HelloApplet'' extendsapplet extendsjapplet x registerskeylistener x group asthis x asafield listenerfield (String) typedkeylistener initialized deregisters showsstatus message ``Hello, world!'' public class HelloApplet extends Applet { KeyListener keylist = new KeyListener() { ; public void init() { showstatus("hello, world!"); addkeylistener(keylist); public void destroy() { removekeylistener(keylist); Steven She Mining framework concepts from application code 6/22
19 Tool Support: Forward Eng 0 H M Lee Model-guided Code Assistance for Framework Application Development Steven She Mining framework concepts from application code 7/22
20 Tool Support: Forward Eng (cont) 0 H M Lee Model-guided Code Assistance for Framework Application Development Steven She Mining framework concepts from application code 8/22
21 Tool Support: Forward Eng (cont) 0 H M Lee Model-guided Code Assistance for Framework Application Development Steven She Mining framework concepts from application code 9/22
22 Tool Support: Reverse Engineering 0 H M Lee Model-guided Code Assistance for Framework Application Development Steven She Mining framework concepts from application code 10/22
23 Constructing FSMLs FSMLs are great! But, how are they constructed? Creator must have an in-depth understanding of the framework Examine tutorials and documentation Examine boiler-plate code and example applications currently an entirely manual process Steven She Mining framework concepts from application code 11/22
24 Constructing FSMLs FSMLs are great! But, how are they constructed? Creator must have an in-depth understanding of the framework Examine tutorials and documentation Examine boiler-plate code and example applications currently an entirely manual process Steven She Mining framework concepts from application code 11/22
25 Constructing FSMLs FSMLs are great! But, how are they constructed? Creator must have an in-depth understanding of the framework Examine tutorials and documentation Examine boiler-plate code and example applications currently an entirely manual process Steven She Mining framework concepts from application code 11/22
26 Mining for Framework Concepts Query Provide hints for finding concept statements Slicing Find related statements Data Mining Find usage patterns among multiple examples Probabilistic Model Output a probabilistic model describing usage Steven She Mining framework concepts from application code 12/22
27 Input Query User selects lines of code in a framework application Steven She Mining framework concepts from application code 13/22
28 Concept Slicing Reduce an example to a minimal set of statements that retains the specified behaviour Source code with Query Steven She Mining framework concepts from application code 14/22
29 Concept Slicing Reduce an example to a minimal set of statements that retains the specified behaviour Source code with Query Program Slicer Steven She Mining framework concepts from application code 14/22
30 Concept Slicing Reduce an example to a minimal set of statements that retains the specified behaviour Source code with Query Program Slicer Relevant Statements Steven She Mining framework concepts from application code 14/22
31 Concept Slicing public class HelloApplet extends JApplet { KeyListener keylist = new KeyListener() { Image smiley; public void init() { smiley = getimage(getcodebase(), "images/smilegif"); showstatus("hello, world!"); addkeylistener(keylist); play(getcodebase(), "audio/woohoowav"); public void destroy() { removekeylistener(keylist); Steven She Mining framework concepts from application code 15/22
32 Concept Slicing public class HelloApplet extends JApplet { KeyListener keylist = new KeyListener() { Image smiley; public void init() { smiley = getimage(getcodebase(), "images/smilegif"); showstatus("hello, world!"); addkeylistener(keylist); play(getcodebase(), "audio/woohoowav"); public void destroy() { removekeylistener(keylist); Steven She Mining framework concepts from application code 15/22
33 Sliced Statements Example Location Statement HelloApplet Class field:keylist (KeyListener) HelloApplet initializer assigns:keylist = new KeyListener() HelloApplet init() calls:addkeylistener(keylist) HelloApplet destroy() calls:removekeylistener(keylist) Steven She Mining framework concepts from application code 16/22
34 Finding Related Usages Steven She Mining framework concepts from application code 17/22
35 Reverse-Engineering the Model Events 1 Events 2 Events 3 Events 4 Sliced Events Steven She Mining framework concepts from application code 18/22
36 Reverse-Engineering the Model Events 1 Events 2 Events 3 Events 4 Sliced Events Data Miner Steven She Mining framework concepts from application code 18/22
37 Reverse-Engineering the Model Events 1 Events 2 Events 3 Events 4 Sliced Events Data Miner Probabilistic Model Steven She Mining framework concepts from application code 18/22
38 Feature Model Mining Mine for probabilistic expressions from slices gathered from multiple applications 0 K Czarnecki, A Wasowski, S She Steven She Mining framework concepts from application code 19/22
39 Feature Model Mining Mine for probabilistic expressions from slices gathered from multiple applications Association Rule conf KeyListener asthis asafield 100% 0 K Czarnecki, A Wasowski, S She Steven She Mining framework concepts from application code 19/22
40 Feature Model Mining Mine for probabilistic expressions from slices gathered from multiple applications Association Rule conf KeyListener asthis asafield 100% asafield asthis 100% 0 K Czarnecki, A Wasowski, S She Steven She Mining framework concepts from application code 19/22
41 Feature Model Mining Mine for probabilistic expressions from slices gathered from multiple applications Association Rule conf KeyListener asthis asafield 100% asafield asthis 100% KeyListener asafield 70% KeyListener asthis 30% 0 K Czarnecki, A Wasowski, S She Steven She Mining framework concepts from application code 19/22
42 Feature Model Mining Mine for probabilistic expressions from slices gathered from multiple applications Association Rule conf KeyListener asthis asafield 100% asafield asthis 100% KeyListener asafield 70% KeyListener asthis 30% asafield new KeyListener() 100% 0 K Czarnecki, A Wasowski, S She Steven She Mining framework concepts from application code 19/22
43 Mined Feature Model KeyListener asthis 30% asafield 70% calls:addkeylistener() new KeyListener() calls:removekeylistnr() 80% this field this field 30% 70% 25% 75% Steven She Mining framework concepts from application code 20/22
44 Framework-Specific Modelling Languages FSML formalizes Framework conforms to uses Framework-specific Model represents Application 0 M Antkiewicz, T Tonelli Bartolomei, K Czarnecki Steven She Mining framework concepts from application code 21/22
45 Conclusions Query Concept Slicing Data Mining Probabilistic Model Constructs a recipe from a set of examples Slicing finds related statements given a query Data mining finds patterns in sliced statements to form a probabilistic model Steven She Mining framework concepts from application code 22/22
StarCharter: A Tool for Mining Concept Recipes
StarCharter: A Tool for Mining Concept Recipes Steven She ECE750-T05: Static Analysis for Software Engineering November 28 st, 2008 Steven She StarCharter:A Tool for Mining Concept Recipes 1/22 Outline
More informationIPM 12/13 P4 Handling Events in AWT
IPM 12/13 P4 Handling Events in AWT Licenciatura em Ciência de Computadores Miguel Tavares Coimbra Why Events? Components need a way to: Receive messages. Send messages. Examples: A TextField needs to
More informationAn applet is a program written in the Java programming language that can be included in an HTML page, much in the same way an image is included in a
CBOP3203 An applet is a program written in the Java programming language that can be included in an HTML page, much in the same way an image is included in a page. When you use a Java technology-enabled
More informationAbstract Classes and Interfaces
Abstract methods Abstract Classes and Interfaces You can declare an object without defining it: Person p; Similarly, you can declare a method without defining it: public abstract void draw(int size); Notice
More informationAn interpreter for framework-specific modeling languages
An interpreter for framework-specific modeling languages Kacper Bak, Steven She Abstract Framework-specific modeling languages (FSMLs) are specifications of framework concepts and their intended usages.
More informationThe init() Method. Browser Calling Applet Methods
Chapter 12 Applets and Advanced GUI The Applet Class The HTML Tag Passing Parameters to Applets Conversions Between Applications and Applets Running a Program as an Applet and as an Application
More informationExample Programs. COSC 3461 User Interfaces. GUI Program Organization. Outline. DemoHelloWorld.java DemoHelloWorld2.java DemoSwing.
COSC User Interfaces Module 3 Sequential vs. Event-driven Programming Example Programs DemoLargestConsole.java DemoLargestGUI.java Demo programs will be available on the course web page. GUI Program Organization
More informationGUI Program Organization. Sequential vs. Event-driven Programming. Sequential Programming. Outline
Sequential vs. Event-driven Programming Reacting to the user GUI Program Organization Let s digress briefly to examine the organization of our GUI programs We ll do this in stages, by examining three example
More informationG51PRG: Introduction to Programming Second semester Applets and graphics
G51PRG: Introduction to Programming Second semester Applets and graphics Natasha Alechina School of Computer Science & IT nza@cs.nott.ac.uk Previous two lectures AWT and Swing Creating components and putting
More informationProgramming Languages and Techniques (CIS120)
Programming Languages and Techniques (CIS120) Lecture 36 April 18, 2012 Swing IV: Mouse and Keyboard Input Announcements Lab this week is review (BRING QUESTIONS) Game Project is out, due Tuesday April
More informationLecture Static Methods and Variables. Static Methods
Lecture 15.1 Static Methods and Variables Static Methods In Java it is possible to declare methods and variables to belong to a class rather than an object. This is done by declaring them to be static.
More informationSAMPLE EXAM Exam 2 Computer Programming 230 Dr. St. John Lehman College City University of New York Thursday, 5 November 2009
SAMPLE EXAM Exam 2 Computer Programming 230 Dr. St. John Lehman College City University of New York Thursday, 5 November 2009 NAME (Printed) NAME (Signed) E-mail Exam Rules Show all your work. Your grade
More informationCT 229 Arrays in Java
CT 229 Arrays in Java 27/10/2006 CT229 Next Weeks Lecture Cancelled Lectures on Friday 3 rd of Nov Cancelled Lab and Tutorials go ahead as normal Lectures will resume on Friday the 10 th of Nov 27/10/2006
More informationGUI 4.1 GUI GUI MouseTest.java import javax.swing.*; import java.awt.*; import java.awt.event.*; /* 1 */
25 4 GUI GUI GUI 4.1 4.1.1 MouseTest.java /* 1 */ public class MouseTest extends JApplet implements MouseListener /* 2 */ { int x=50, y=20; addmouselistener(this); /* 3 */ super.paint(g); /* 4 */ g.drawstring("hello
More informationGUI, Events and Applets from Applications, Part III
GUI, Events and Applets from Applications, Part III Quick Start Compile step once always javac PropertyTax6.java mkdir labs cd labs Execute step mkdir 6 appletviewer PropertyTax6.htm cd 6 emacs PropertyTax6.htm
More informationNews! Feedback after Lecture 4! About Java and OOP!
this Example: SignalGUI News Orphans Recursive References D0010E Object-Oriented Programming and Design Lecture 5 GUI Design Patterns Applets Model-View- Control Observer Hints for Lab 2 Use a Vector to
More informationMethod Of Key Event Key Listener must implement three methods, keypressed(), keyreleased() & keytyped(). 1) keypressed() : will run whenever a key is
INDEX Event Handling. Key Event. Methods Of Key Event. Example Of Key Event. Mouse Event. Method Of Mouse Event. Mouse Motion Listener. Example of Mouse Event. Event Handling One of the key concept in
More informationThe first applet we shall build will ask the user how many times the die is to be tossed. The request is made by utilizing a JoptionPane input form:
Lecture 5 In this lecture we shall discuss the technique of constructing user-defined methods in a class. The discussion will be centered about an experiment of tossing a die a specified number of times.
More informationCSC System Development with Java Introduction to Java Applets Budditha Hettige
CSC 308 2.0 System Development with Java Introduction to Java Applets Budditha Hettige Department of Statistics and Computer Science What is an applet? applet: a Java program that can be inserted into
More informationObject-oriented programming in Java (2)
Programming Languages Week 13 Object-oriented programming in Java (2) College of Information Science and Engineering Ritsumeikan University plan last week intro to Java advantages and disadvantages language
More informationJava Applet & its life Cycle. By Iqtidar Ali
Java Applet & its life Cycle By Iqtidar Ali Java Applet Basic An applet is a java program that runs in a Web browser. An applet can be said as a fully functional java application. When browsing the Web,
More informationCS 134 Test Program #2
CS 134 Test Program #2 Sokoban Objective: Build an interesting game using much of what we have learned so far. This second test program is a computer maze game called Sokoban. Sokoban is a challenging
More informationRecitation 02/02/07 Defining Classes and Methods. Chapter 4
Recitation 02/02/07 Defining Classes and Methods 1 Miscellany Project 2 due last night Exam 1 (Ch 1-4) Thursday, Feb. 8, 8:30-9:30pm PHYS 112 Sample Exam posted Project 3 due Feb. 15 10:00pm check newsgroup!
More informationInheritance. Chapter 7. Chapter 7 1
Inheritance Chapter 7 Chapter 7 1 Introduction to Inheritance Inheritance allows us to define a general class and then define more specialized classes simply by adding new details to the more general class
More informationModule 5 Applets About Applets Hierarchy of Applet Life Cycle of an Applet
About Applets Module 5 Applets An applet is a little application. Prior to the World Wide Web, the built-in writing and drawing programs that came with Windows were sometimes called "applets." On the Web,
More informationCS 180 Problem Solving and Object Oriented Programming Fall 2011
CS 180 Problem Solving and Object Oriented Programming Fall 2011 hlp://www.cs.purdue.edu/homes/apm/courses/cs180fall2011/ This Week: Notes for Week : Oct 24-28, 2011 Aditya Mathur Department of Computer
More informationContents 8-1. Copyright (c) N. Afshartous
Contents 1. Classes and Objects 2. Inheritance 3. Interfaces 4. Exceptions and Error Handling 5. Intro to Concurrency 6. Concurrency in Java 7. Graphics and Animation 8. Applets 8-1 Chapter 8: Applets
More informationJava WebStart, Applets & RMI
Java WebStart, Applets & RMI 11-13-2013 Java WebStart & Applets RMI Read: Java Web Start Tutorial Doing More with Rich Internet Applications Java Web Start guide Exam#2 is scheduled for Tues., Nov. 19,
More informationapplication components
What you need to know for Lab 1 code to publish workflow application components activities An activity is an application component that provides a screen with which users can interact in order to do something,
More informationImplementing and Maintaining Microsoft SQL Server 2008 Analysis Services
Course 6234A: Implementing and Maintaining Microsoft SQL Server 2008 Analysis Services Course Details Course Outline Module 1: Introduction to Microsoft SQL Server Analysis Services This module introduces
More informationJava Programming Unit 6. Inner Classes. Intro to Apples. Installing Apache Tomcat Server.
Java Programming Unit 6 Inner Classes. Intro to Apples. Installing Apache Tomcat Server. Swing Adapters Swing adapters are classes that implement empty funchons required by listener interfaces. You need
More informationDefining Classes and Methods
Defining Classes and Methods Chapter 4 Chapter 4 1 Basic Terminology Objects can represent almost anything. A class defines a kind of object. It specifies the kinds of data an object of the class can have.
More informationLast Class: Network Overview. Today: Distributed Systems
Last Class: Network Overview =>Processes in a distributed system all communicate via a message exchange. Physical reality: packets Abstraction: messages limited size arbitrary size unordered (sometimes)
More informationCSCI 053. Week 5 Java is like Alice not based on Joel Adams you may want to take notes. Rhys Price Jones. Introduction to Software Development
CSCI 053 Introduction to Software Development Rhys Price Jones Week 5 Java is like Alice not based on Joel Adams you may want to take notes Objectives Learn to use the Eclipse IDE Integrated Development
More informationREAD AND OBSERVE THE FOLLOWING RULES:
This examination has 11 pages: check that you have a complete paper. Check that you have a complete paper. Each candidate should be prepared to produce, upon request, his or her SUNY/UB card. This is a
More informationSun ONE Integrated Development Environment
DiveIntoSunONE.fm Page 197 Tuesday, September 24, 2002 8:49 AM 5 Sun ONE Integrated Development Environment Objectives To be able to use Sun ONE to create, compile and execute Java applications and applets.
More informationUsage Scenarios for Feature Model Synthesis.
Usage Scenarios for Feature Model Synthesis Steven She, Krzysztof Czarnecki, Andrzej Wasowski University of Waterloo IT University of Copenhagen September 30, 2012 Why Synthesize a Feature Model? Variability
More informationJava Applets. Last Time. Java Applets. Java Applets. First Java Applet. Java Applets. v We created our first Java application
Last Time v We created our first Java application v What are the components of a basic Java application? v What GUI component did we use in the examples? v How do we write to the standard output? v An
More informationDEMYSTIFYING PROGRAMMING: CHAPTER FOUR
DEMYSTIFYING PROGRAMMING: CHAPTER FOUR Chapter Four: ACTION EVENT MODEL 1 Objectives 1 4.1 Additional GUI components 1 JLabel 1 JTextField 1 4.2 Inductive Pause 1 4.4 Events and Interaction 3 Establish
More informationCS211 GUI Dynamics. Announcements. Motivation/Overview. Example Revisted
CS211 GUI Dynamics Announcements Prelim 2 rooms: A-M are in Olin 155 N-A are in Olin 255 Final exam: final exam 5/17, 9-11:30am final review session (TBA, likely Sun 5/15) Consulting: regular consulting
More informationMethods (Deitel chapter 6)
Methods (Deitel chapter 6) 1 Plan 2 Introduction Program Modules in Java Math-Class Methods Method Declarations Argument Promotion Java API Packages Random-Number Generation Scope of Declarations Methods
More informationModule 4 Multi threaded Programming, Event Handling. OOC 4 th Sem, B Div Prof. Mouna M. Naravani
Module 4 Multi threaded Programming, Event Handling OOC 4 th Sem, B Div 2016-17 Prof. Mouna M. Naravani Event Handling Any program that uses a graphical user interface, such as a Java application written
More informationJava Foundations John Lewis Peter DePasquale Joe Chase Third Edition
Java Foundations John Lewis Peter DePasquale Joe Chase Third Edition Pearson Education Limited Edinburgh Gate Harlow Essex CM20 2JE England and Associated Companies throughout the world Visit us on the
More informationCS 120 Fall 2008 Practice Final Exam v1.0m. Name: Model Solution. True/False Section, 20 points: 10 true/false, 2 points each
CS 120 Fall 2008 Practice Final Exam v1.0m Name: Model Solution True/False Section, 20 points: 10 true/false, 2 points each Multiple Choice Section, 32 points: 8 multiple choice, 4 points each Code Tracing
More informationApplications to Java Instruction
Programmed Instruction and Interteaching: Applications to Java Instruction Heather K. Holden & Henry H. Emurian hholden1@umbc.edu emurian@umbc.edu Learning objective Write a Java applet to display a text
More informationIntroduction to Computer Science I
Introduction to Computer Science I Graphics Janyl Jumadinova 7 February, 2018 Graphics Graphics can be simple or complex, but they are just data like a text document or sound. Java is pretty good at graphics,
More informationBasic Keywords Practice Session
Basic Keywords Practice Session Introduction In this article from my free Java 8 course, we will apply what we learned in my Java 8 Course Introduction to our first real Java program. If you haven t yet,
More informationGUI in Java TalentHome Solutions
GUI in Java TalentHome Solutions AWT Stands for Abstract Window Toolkit API to develop GUI in java Has some predefined components Platform Dependent Heavy weight To use AWT, import java.awt.* Calculator
More informationHandling Mouse and Keyboard Events
Handling Mouse and Keyboard Events 605.481 1 Java Event Delegation Model EventListener handleevent(eventobject handleevent(eventobject e); e); EventListenerObject source.addlistener(this);
More informationExample: CharCheck. That s It??! What do you imagine happens after main() finishes?
Event-Driven Software Paradigm Today Finish Programming Unit: Discuss Graphics In the old days, computers did exactly what the programmer said Once started, it would run automagically until done Then you
More informationChapter 5 - Methods Prentice Hall, Inc. All rights reserved.
1 Chapter 5 - Methods 2003 Prentice Hall, Inc. All rights reserved. 2 Introduction Modules Small pieces of a problem e.g., divide and conquer Facilitate design, implementation, operation and maintenance
More informationPrivacy Protected Spatial Query Processing
Privacy Protected Spatial Query Processing Slide 1 Topics Introduction Cloaking-based Solution Transformation-based Solution Private Information Retrieval-based Solution Slide 2 1 Motivation The proliferation
More informationANNA UNIVERSITY :: CHENNAI - 25 TIME TABLE M.C.A. (DISTANCE EDUCATION) DEGREE EXAMINATIONS AUGUST - SEPTEMBER
MCA 31-AUG-16 30-AUG-16 1 2 3 4 111001 : Programming Languages 111002 : Management Accounting 111003 : Data Structures and C 111004 : Computer Architecture and Organization 111005 : Operating Systems 112010
More informationMergesort again. 1. Split the list into two equal parts
Quicksort Mergesort again 1. Split the list into two equal parts 5 3 9 2 8 7 3 2 1 4 5 3 9 2 8 7 3 2 1 4 Mergesort again 2. Recursively mergesort the two parts 5 3 9 2 8 7 3 2 1 4 2 3 5 8 9 1 2 3 4 7 Mergesort
More informationDCS235 Software Engineering Exercise Sheet 2 Using Java Collections
DCS235 Software Engineering Exercise Sheet 2 Using Java Collections Prerequisites October 2004 You should understand Java interfaces. If you need to revise this, see Jia section 4.4.7 and 5.3. You should
More informationDependencies, dependencies, dependencies
Dependencies, dependencies, dependencies Marcel Offermans!"#$%&'&()"* 1 Marcel Offermans Fellow and Software Architect at Luminis Technologies marcel.offermans@luminis.nl Member and Committer at Apache
More informationThe AWT Event Model 9
The AWT Event Model 9 Course Map This module covers the event-based GUI user input mechanism. Getting Started The Java Programming Language Basics Identifiers, Keywords, and Types Expressions and Flow
More informationPROGRAMMING LANGUAGE 2
1 PROGRAMMING LANGUAGE 2 Lecture 13. Java Applets Outline 2 Applet Fundamentals Applet class Applet Fundamentals 3 Applets are small applications that are accessed on an Internet server, transported over
More informationArrays (Deitel chapter 7)
Arrays (Deitel chapter 7) Plan Arrays Declaring and Creating Arrays Examples Using Arrays References and Reference Parameters Passing Arrays to Methods Sorting Arrays Searching Arrays: Linear Search and
More informationChapter 12 Advanced GUIs and Graphics
Chapter 12 Advanced GUIs and Graphics Chapter Objectives Learn about applets Explore the class Graphics Learn about the classfont Explore the classcolor Java Programming: From Problem Analysis to Program
More informationISO-2022-JP (JIS ) 1 2. (Windows95/98 MacOS ) Java UNICODE UNICODE. Java. .java.java.txt native2ascii. .java
2000 8 2000.1.24-27 0 4 1 ( (1 8 ) ASCII 1 8 1 1 8 2 ISO-2022-JP (JIS ) 1 2 EUC ( EUC) 8 Unix SJIS (MS ) EUC 8 ( (Windows95/98 MacOS Java UNICODE UNICODE ( Java.java.java.txt native2ascii.java native2ascii
More informationPage 1 of 7. public class EmployeeAryAppletEx extends JApplet
CS 209 Spring, 2006 Lab 9: Applets Instructor: J.G. Neal Objectives: To gain experience with: 1. Programming Java applets and the HTML page within which an applet is embedded. 2. The passing of parameters
More informationMergesort again. 1. Split the list into two equal parts
Quicksort Mergesort again 1. Split the list into two equal parts 5 3 9 2 8 7 3 2 1 4 5 3 9 2 8 7 3 2 1 4 Mergesort again 2. Recursively mergesort the two parts 5 3 9 2 8 7 3 2 1 4 2 3 5 8 9 1 2 3 4 7 Mergesort
More informationMethods (Deitel chapter 6)
1 Plan 2 Methods (Deitel chapter ) Introduction Program Modules in Java Math-Class Methods Method Declarations Argument Promotion Java API Packages Random-Number Generation Scope of Declarations Methods
More informationWhich of the following syntax used to attach an input stream to console?
Which of the following syntax used to attach an input stream to console? FileReader fr = new FileReader( input.txt ); FileReader fr = new FileReader(FileDescriptor.in); FileReader fr = new FileReader(FileDescriptor);
More informationChapter 13. Applets and HTML. HTML Applets. Chapter 13 Java: an Introduction to Computer Science & Programming - Walter Savitch 1
Chapter 13 Applets and HTML HTML Applets Chapter 13 Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Overview Applets: Java programs designed to run from a document on the Internet
More informationCSD Univ. of Crete Fall Java Applets
Java Applets 1 Applets An applet is a Panel that allows interaction with a Java program Typically embedded in a Web page and can be run from a browser You need special HTML in the Web page to tell the
More informationH212 Introduction to Software Systems Honors
Introduction to Software Systems Honors Lecture #19: November 4, 2015 1/14 Third Exam The third, Checkpoint Exam, will be on: Wednesday, November 11, 2:30 to 3:45 pm You will have 3 questions, out of 9,
More informationDEMYSTIFYING PROGRAMMING: CHAPTER SIX METHODS (TOC DETAILED) CHAPTER SIX: METHODS 1
DEMYSTIFYING PROGRAMMING: CHAPTER SIX METHODS (TOC DETAILED) CHAPTER SIX: METHODS 1 Objectives 1 6.1 Methods 1 void or return 1 Parameters 1 Invocation 1 Pass by value 1 6.2 GUI 2 JButton 2 6.3 Patterns
More informationCS1004: Intro to CS in Java, Spring 2005
CS4: Intro to CS in Java, Spring 25 Lecture #8: GUIs, logic design Janak J Parekh janak@cs.columbia.edu Administrivia HW#2 out New TAs, changed office hours How to create an Applet Your class must extend
More information1. What is Jav a? simple
1. What is Jav a? Thanks to Java is a new programming language developed at Sun under the direction of James Gosling. As far as possible it is based on concepts from C, Objective C and C++. Java is interpreted
More informationChapter 4 Control Structures: Part 2
Chapter 4 Control Structures: Part 2 1 2 Essentia ls of Counter-Controlled Repetition Counter-controlled repetition requires: Control variable (loop counter) Initial value of the control variable Increment/decrement
More informationComputer Science 225 Advanced Programming Siena College Spring Topic Notes: Inheritance
Computer Science 225 Advanced Programming Siena College Spring 2017 Topic Notes: Inheritance Our next topic is another that is fundamental to object-oriented design: inheritance. Inheritance allows a programmer
More informationSolids as point set. Solid models. Solid representation schemes (cont d) Solid representation schemes. Solid representation schemes (cont d)
Solid models Solid models developed to address limitations of wireframe modeling. Attempt was to create systems which create only complete representations. Modelers would support direct creation of 3D
More information8. Polymorphism and Inheritance
8. Polymorphism and Inheritance Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich http://seal.ifi.uzh.ch/info1 Objectives Describe polymorphism and inheritance in general Define interfaces
More informationASSIGNMENT NO 14. Objectives: To learn and demonstrated use of applet and swing components
Create an applet with three text Fields and four buttons add, subtract, multiply and divide. User will enter two values in the Text Fields. When any button is pressed, the corresponding operation is performed
More informationCommand-Line Applications. GUI Libraries GUI-related classes are defined primarily in the java.awt and the javax.swing packages.
1 CS257 Computer Science I Kevin Sahr, PhD Lecture 14: Graphical User Interfaces Command-Line Applications 2 The programs we've explored thus far have been text-based applications A Java application is
More informationHigher National Diploma in Information Technology First Year, Second Semester Examination 2015
[All Rights Reserved] SLIATE SRI LANKA INSTITUTE OF ADVANCED TECHNOLOGICAL EDUCATION (Established in the Ministry of Higher Education, vide in Act No. 29 of 1995) Higher National Diploma in Information
More informationChapter 2 Using Objects. Types. Number Literals. A type defines a set of values and the operations that can be carried out on the values Examples:
Chapter 2 Using Objects Chapter Goals To learn about variables To understand the concepts of classes and objects To be able to call methods To learn about parameters and return values To be able to browse
More informationOutline. More on the Swing API Graphics: double buffering and timers Model - View - Controller paradigm Applets
Advanced Swing Outline More on the Swing API Graphics: double buffering and timers Model - View - Controller paradigm Applets Using menus Frame menus add a menu bar to the frame (JMenuBar) add menus to
More informationSolutions to Chapter Exercises. GUI Objects and Event-Driven Programming
Solutions to Chapter Exercises 13 GUI Objects and Event-Driven Programming 13.1. Discuss the major difference between a frame and a dialog. 1. Frame can have a menu while Dialog cannot. 2. Dialog can be
More informationMULTIMEDIA PROGRAMMING IN JAVA. Prof.Asoc. Alda Kika Department of Informatics Faculty of Natural Sciences University of Tirana
MULTIMEDIA PROGRAMMING IN JAVA Prof.Asoc. Alda Kika Department of Informatics Faculty of Natural Sciences University of Tirana Objectives Applets in Java Getting, displaying and scaling the image How to
More informationDistributed Systems. Distributed Object Systems 2 Java RMI. Java RMI. Example. Applet continued. Applet. slides2.pdf Sep 9,
Distributed Object Systems 2 Java RMI Piet van Oostrum Distributed Systems What should a distributed system provide? Illusion of one system while running on multiple systems Transparancy Issues Communication,
More informationShared Collection of Java Course Materials: New Topics Covered. Agenda
Shared Collection of Java Course Materials: New Topics Covered Dragoslav Pešovi ović DAAD project Joint Course on OOP using Java Humboldt University Berlin, University of Novi Sad, Polytehnica University
More informationCSC 1051 Algorithms and Data Structures I. Midterm Examination February 24, Name: KEY 1
CSC 1051 Algorithms and Data Structures I Midterm Examination February 24, 2014 Name: KEY 1 Question Value Score 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 10 9 10 10 10 TOTAL 100 Please answer questions in
More informationChapter 3 - Introduction to Java Applets
1 Chapter 3 - Introduction to Java Applets 2 Introduction Applet Program that runs in appletviewer (test utility for applets) Web browser (IE, Communicator) Executes when HTML (Hypertext Markup Language)
More informationCS Week 15 Page 1
Reading: 1. Deitel & Deitel, Chapters 10 Objectives: 1. Continue discussing Object Oriented Programming 2. Final Exam Review Concepts: 1. More About Polymorphism References: 1. http://www.prenhall.com/deitel/
More informationCOMS 1003 Fall Introduction to Computer Programming in C. Bits, Boolean Logic & Discrete Math. September 13 th
COMS 1003 Fall 2005 Introduction to Computer Programming in C Bits, Boolean Logic & Discrete Math September 13 th Hello World! Logistics See the website: http://www.cs.columbia.edu/~locasto/ Course Web
More information2 Getting Started. Getting Started (v1.8.6) 3/5/2007
2 Getting Started Java will be used in the examples in this section; however, the information applies to all supported languages for which you have installed a compiler (e.g., Ada, C, C++, Java) unless
More informationCPSC 324 Topics in Java Programming
CPSC 324 Topics in Java Programming Lecture 7 Today Go over quiz Assignment 2 notes Start on basic class inheritance Applets lab Reading assignments Core: Ch. 4: 144-152, 162-169 Core: Ch. 5: 171-182 CPSC
More informationConditionals: More Fun with If-Then and Logic Operators
Conditionals: More Fun with If-Then and Logic Operators Goals Great job so far! There are a lot of things you already know how to do! In this tutorial and in the following ones you will get a chance to
More informationGenerating Continuation Passing Style Code for the Co-op Language
Generating Continuation Passing Style Code for the Co-op Language Mark Laarakkers University of Twente Faculty: Computer Science Chair: Software engineering Graduation committee: dr.ing. C.M. Bockisch
More informationCS2 Advanced Programming in Java note 8
CS2 Advanced Programming in Java note 8 Java and the Internet One of the reasons Java is so popular is because of the exciting possibilities it offers for exploiting the power of the Internet. On the one
More information11/19/2014. Objects. Chapter 4: Writing Classes. Classes. Writing Classes. Java Software Solutions for AP* Computer Science A 2nd Edition
Chapter 4: Writing Classes Objects An object has: Presentation slides for state - descriptive characteristics Java Software Solutions for AP* Computer Science A 2nd Edition by John Lewis, William Loftus,
More informationCut, Paste, Drag-and-Drop
Cut, Paste, Drag-and-Drop Transferring Data Cut and paste via the clipboard and drag and drop allows for (relatively) easy data transfer within and between applications Expected behaviour of any application
More informationDiscovering the Power of Excel PowerPivot Data Analytic Expressions (DAX)
Discovering the Power of Excel 2010-2013 PowerPivot Data Analytic Expressions (DAX) 55108; 2 Days, Instructor-led Course Description This course is intended to expose you to PowerPivot Data Analytic Expressions
More informationTutorials. Tutorial every Friday at 11:30 AM in Toldo 204 * discuss the next lab assignment
60-212 subir@cs.uwindsor.ca Phone # 253-3000 Ext. 2999 web site for course www.cs.uwindsor.ca/60-212 Dr. Subir Bandyopadhayay Website has detailed rules and regulations All assignments and labs will be
More informationCSC 1051 Algorithms and Data Structures I. Midterm Examination February 26, Name: Key
CSC 1051 Algorithms and Data Structures I Midterm Examination February 26, 2015 Name: Key Question Value 1 10 Score 2 10 3 10 4 10 5 10 6 10 7 10 8 10 9 10 10 10 TOTAL 100 Please answer questions in the
More informationPLATE TECTONICS DATA VIEWER Developed by Claudia Owen and Eric Sproles
PLATE TECTONICS DATA VIEWER Developed by Claudia Owen and Eric Sproles What is a Data Viewer? A data viewer is a program to view maps on the Internet that were generated by a Geographic Information System
More informationExample: Building a Java GUI
Steven Zeil October 25, 2013 Contents 1 Develop the Model 2 2 Develop the layout of those elements 3 3 Add listeners to the elements 9 4 Implement custom drawing 12 1 The StringArt Program To illustrate
More information