SIMPLE PROBLEM SOLVING in Java: a Problem Set Framework Viera K. Proulx Richard Rasala Jason Jay Rodrigues CCSCNE 2002 Conference.

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

1 Packages: Putting Classes Together. 2 Introduction The main feature of OOP is its ability to support the reuse of code: Extending the classes (via inheritance)
1 G54PRG Programming Lecture 1 Amadeo Ascó Adam Moore 22 GUI Programming I.
Java Power Tools: A Foundation for Interactive GUI Exploration Viera K. Proulx, Richard Rasala, Jeff Raab HCI 2001 Conference New Orleans, LA August 10,
Java Programming, 3e Concepts and Techniques Chapter 4 Decision Making and Repetition with Reusable Objects.
Event Driven Programming and GUIs Part 3 CS221 – 4/15/09.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
1 Frameworks. 2 Framework Set of cooperating classes/interfaces –Structure essential mechanisms of a problem domain –Programmer can extend framework classes,
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
K. Stirewalt CSE 335: Software Design Outline of course topics Foundational OO concepts Synthetic concepts: –Program families, program fragments, and abstract.
Review CSC 171 FALL 2004 LECTURE 21. Topics Objects and Classes Fundamental Types Graphics and Applets Decisions Iteration Designing Classes Testing and.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Chapter 7 Improving the User Interface
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Written by Liron Blecher
Java Programming, 2E Introductory Concepts and Techniques Chapter 2 Creating a Java Application and Applet.
CS413: Java Programming language Applications Applets
Microsoft Visual Basic 2005: Reloaded Second Edition
Java Programming, 3e Concepts and Techniques Chapter 2 - Part 2 Creating a Java Application and Applet.
Java Power ToolsNortheastern CCS EdGroup Java Power Tools Model Software for Teaching Object-Oriented Design Richard Rasala Jeff Raab Viera Proulx
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
An Introduction to Visual Basic
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Chapter 8: Writing Graphical User Interfaces
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 1B Introduction (Tutorial)
Java Programming: From Problem Analysis to Program Design, Second Edition1  Learn about basic GUI components.  Explore how the GUI components JFrame,
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
Programming Concept Chapter I Introduction to Java Programming.
COS240 O-O Languages AUBG, COS dept Lecture 33 Title: C# vs. Java (GUI Programming) Reference: COS240 Syllabus.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Introduction to Windows Programming
Java Applets. 2 Introduction to Java Applet Programs Applications are ___________________ programs –executed with Java interpreter Applet is a small program.
Graphics and Event-Driven Programming in Java John C. Ramirez Department of Computer Science University of Pittsburgh.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing with Graphics.
1 CSC 222: Object-Oriented Programming Spring 2012 netBeans & GUIBuilder  netBeans IDE create/edit/run a project  GUIBuilder JFrame, JButton, JTextField,
Chapter 2 – Introduction to the Visual Studio .NET IDE
Creating Windows. How can we use Java to create programs that use windows (GUI applications)? How can we use Java to create programs that use windows.
 GUI – Graphic User Interface  Up to now in the programs we have written all output has been sent to the standard output device i.e.: the DOS console.
CS324e - Elements of Graphics and Visualization Java GUIs - Event Handling.
SEEM3460 Tutorial GUI in Java. Some Basic GUI Terms Component (Control in some languages) the basic GUI unit something visible something that user can.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 – Graphical User Interfaces Java Foundations: Introduction to Programming.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
The SIGCSE 2001 Maze Demonstration Program Richard Rasala, Jeff Raab, Viera K. Proulx College of Computer Science Northeastern University Boston MA
GUIs Graphical User Interfaces. Everything coming together Known: – Inheritance – Interfaces – Abstract classes – Polymorphism – Exceptions New: – Events.
Object-Oriented Application Development Using VB.NET 1 Chapter 10 VB.NET GUI Components Overview.
Boris Milašinović Faculty of Electrical Engineering and Computing University of Zagreb, Croatia 15th Workshop on "Software Engineering Education and Reverse.
JAVA INTRODUCTION. What is Java? 1. Java is a Pure Object – Oriented language 2. Java is developing by existing languages like C and C++. How Java Differs.
Creating a Java Application and Applet
Packages. The main feature of OOP is its ability to support the reuse of code: –Extending the classes –Extending interfaces The features in basic form.
JAVA: An Introduction to Problem Solving & Programming, 6 th Ed. By Walter Savitch ISBN © 2012 Pearson Education, Inc., Upper Saddle River,
Chapter 10 - Writing Graphical User Interfaces1 Chapter 10 Writing Graphical User Interfaces.
1 G4UIRoot Isidro González ALICE ROOT /10/2002.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
CSC 205 Programming II Lecture 5 AWT - I.
CSC 222: Object-Oriented Programming
Chapter 2 – Introduction to the Visual Studio .NET IDE
PRG 421 GUIDE Higher Education / prg421guide.com.
PRG 421 MART Higher Education / prg421mart.com
PRG 421 MART Lessons in Excellence-- prg421mart.com.
PRG 421 GUIDE Lessons in Excellence -- prg421guide.com.
PRG 421 GUIDE Education for Service-- prg421guide.com.
PRG 421 knowledge is divine-- snaptutorial.com. PRG 421 All Assignment For more classes visit PRG 421 Individual Week 1 Analyze Assignment.
Chapter 14 JavaFX Basics Dr. Clincy - Lecture.
Java IO and Testing made simple
Constructors, GUI’s(Using Swing) and ActionListner
TA: Nouf Al-Harbi NoufNaief.net :::
Presentation transcript:

SIMPLE PROBLEM SOLVING in Java: a Problem Set Framework Viera K. Proulx Richard Rasala Jason Jay Rodrigues CCSCNE 2002 Conference Worcester State College, Worcester, MA April, 19,

CCSCNE 2002 Proulx, Rasala, Rodrigues 2 Outline l Motivation l Goals l JPT background l The Problem Set Framework l The architecture l Uses of PSF l This is all you need to know

CCSCNE 2002 Proulx, Rasala, Rodrigues 3 Motivation We wanted to be able to l write small functions – without classes l explore classes –constructors, member functions –copy vs. assignment vs. clone l test classes as they are built l run several different applications easily

CCSCNE 2002 Proulx, Rasala, Rodrigues 4 Goals Create a framework that would give us l access to the console l access to the graphics window l one action button per function we want to test l automatic action button definition and labeling l synchronization of the button responses l ability to add other classes to the project

CCSCNE 2002 Proulx, Rasala, Rodrigues 5 JPT Background Toolkit to support fast GUI building in Java Support for Model – View communication Support for Action – Control binding Support for robust input stream parsing Support for graphics Support for layout control Support for event – action – adapters Platform for showcase labs

CCSCNE 2002 Proulx, Rasala, Rodrigues 6 JPT Background Actions – installed in one statement Console –parsed error-checked input –color coded input, output, error stream –scrollable, can save to a file, resize font Graphics – buffered panel with mouse action adapter GUI components, layout control, more...

CCSCNE 2002 Proulx, Rasala, Rodrigues 7 The Problem Set Framework l Two classes – application and framework l Application builds GUI, buttons, console l Framework contains user’s test functions l Mutual reference – allows two-way access –The test functions access the graphics window and console supplied by the application –The GUI buttons created by the application use the code in the test functions for their actions

CCSCNE 2002 Proulx, Rasala, Rodrigues 8 The Problem Set Framework Each test function runs in its own thread: ThreadedAction class defined l All functions synchronized l Use reflection to –extract function names –create button labels –define corresponding actions l Catch the exception messages – forward to the user

CCSCNE 2002 Proulx, Rasala, Rodrigues 9 The Architecture and Design User side: ProblemSetClass l Modify the ProblemSetClass –define the test functions using the pattern public synchronized void TestFunction(){...} –define additional utility functions – if you wish –define objects that all test functions can share – if you wish –use text I/O – via System or (JPT) console –use graphics (Java2D Graphics) – in the BufferedPanel l Add any classes that you want to test to the project Use GeneralDialog for additional interactions

CCSCNE 2002 Proulx, Rasala, Rodrigues 10 The Architecture and Design System side: ProblemSetApplication –define and install the BufferedPanel in the main frame and activate the (JPT) console –use reflection to get a list of all methods that are declared as: public synchronized void TestFunction(); –create a ThreadedAction and button for each –use method names for button labels –add the Clear Window button and the Exit button

CCSCNE 2002 Proulx, Rasala, Rodrigues 11 Uses of PSF l Simple algorithmics and problem sets l Tutorials on OO concepts –constructors and the reference model –inheritance –abstract classes –static –interfaces –casting l Data structure exercises – with display

CCSCNE 2002 Proulx, Rasala, Rodrigues 12 Uses of PSF l In lecture demonstrations and live exploration of new concepts l Unit testing for a new class or classes –to be used both by students and developers l Demo platform –several different applications may be grouped in one PSF and launched without the need for separate projects or separate compilations

CCSCNE 2002 Proulx, Rasala, Rodrigues 13 This Is All You Need To Know Project includes two classes and jpt.jar Modify only the file ProblemSetClass.java l Insert functions to run – make sure that the method header has the form public synchronized void TestFunction( ){...} l Add utility functions using a different header l Add additional classes as needed l Compile and run the PSF application

CCSCNE 2002 Proulx, Rasala, Rodrigues 14 This Is All You Need To Know We cannot and do not want to live without it l We use the PSF in nearly every lecture l Students run regression tests on their work l Tutorial examples on classes and objects are given to students in PSF format l We use the PSF test bed to develop new JPT features

SIMPLE PROBLEM SOLVING in Java: a Problem Set Framework Viera K. Proulx Richard Rasala Jason Jay Rodrigues Partially supported by the NSF grant DUE