private int turn; /** keeps track of which players turn it is **/ private int click; /** keeps track of how many button clicks have occured **/

Size: px
Start display at page:

Download "private int turn; /** keeps track of which players turn it is **/ private int click; /** keeps track of how many button clicks have occured **/"

Transcription

1 /** naveen Robert Carter < <<<<<<<<<<<<<<<<< * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.random; // which class should this class inherit from? // this class should implement an interface too! // modify the next line: public class TicTacToe extends JFrame implements ActionListener{ /** *************************************************** * maintains the state of the game. 1 indicates a "O" * * and 2 indicates a "X" and 0 indicates unmarked * ******************************************************/ private int playingfield[] = new int[9]; private int turn; /** keeps track of which players turn it is **/ private int click; /** keeps track of how many button clicks have occured **/ /** Label which displays which players turn it is and the winner **/ private JLabel infolabel; /** First button (row0 and column 0) **/ private JButton button0; //declare remaining buttons here private JButton button1; private JButton button2; private JButton button3; private JButton button4; private JButton button5; private JButton button6; private JButton button7; private JButton button8; private JButton reset; private JButton quit; public TicTacToe(){ super("tic Tac Toe"); this.setsize(400,400); this.setdefaultcloseoperation(jframe.exit_on_close); this.turn = 1; this.click = 0; this.setup();

2 // add code to make the frame visible this.setvisible(true); private void setup(){ Container contentpane = this.getcontentpane(); contentpane.setlayout(null); /** change the background color **/ contentpane.setbackground(new Color(186,186,186)); contentpane.setforeground(new Color(205, 0, 0)); this.button0 = new JButton(); this.button0.setbounds(100,20,80,80); this.button0.setactioncommand("button0"); // add an action listener to the button here, this will call the //actionperformed method if the button is clicked button0.addactionlistener(this); /** adding the first button to the content pane of the frame **/ contentpane.add(button0); // add remaining buttons here and set their bounds this.button1 = new JButton(); this.button1.setbounds(100,120,80,80); this.button1.setactioncommand("button1"); contentpane.add(button1); button1.addactionlistener(this); this.button2 = new JButton(); this.button2.setbounds(100,220,80,80); this.button2.setactioncommand("button2"); contentpane.add(button2); button2.addactionlistener(this); this.button3 = new JButton(); this.button3.setbounds(200,20,80,80); this.button3.setactioncommand("button3"); contentpane.add(button3); button3.addactionlistener(this); this.button4 = new JButton(); this.button4.setbounds(200,120,80,80); this.button4.setactioncommand("button4"); contentpane.add(button4); button4.addactionlistener(this); this.button5 = new JButton(); this.button5.setbounds(200,220,80,80); this.button5.setactioncommand("button5"); contentpane.add(button5); button5.addactionlistener(this); this.button6 = new JButton(); this.button6.setbounds(300,20,80,80); this.button6.setactioncommand("button6");

3 contentpane.add(button6); button6.addactionlistener(this); this.button7 = new JButton(); this.button7.setbounds(300,120,80,80); this.button7.setactioncommand("button7"); contentpane.add(button7); button7.addactionlistener(this); this.button8 = new JButton(); this.button8.setbounds(300,220,80,80); this.button8.setactioncommand("button8"); contentpane.add(button8); button8.addactionlistener(this); this.reset = new JButton(); this.reset.setbounds(10,120,80,80); this.reset.setactioncommand("reset"); this.reset.settext("reset"); contentpane.add(reset); reset.addactionlistener(this); this.quit = new JButton(); this.quit.setbounds(10,220,80,80); this.quit.setactioncommand("quit"); this.quit.settext("quit"); contentpane.add(quit); quit.addactionlistener(this); this.infolabel = new JLabel(); /** the label initially displays this **/ this.infolabel.settext("turn: Player1(O)"); this.infolabel.setbounds(10,310,200,30); contentpane.add(infolabel); private void reset(){ TicTacToe thegame = new TicTacToe(); thegame.setvisible(true); thegame.setdefaultcloseoperation(jframe.exit_on_close); // Complete the implementation of actionperformed() public void actionperformed(actionevent ae) { String source = ae.getactioncommand(); String text; /** "O" for player 1 and "X" for player 2 **/ click++; /** incrementing the number of clicks **/ int tempturn = turn; if(turn == 1){ turn = 2;/** next turn player 2 **/ text = "O"; this.infolabel.settext("turn: Player2(X)"); else{ text = "X"; turn = 1; /** next turn player 1 **/ this.infolabel.settext("turn: Player1(O)");

4 if(source.equals("button0")){ button0.settext(text); /** if first button is clicked settext to "O" **/ playingfield[0] = tempturn; /** update the state of the game **/ //write the actions for the remaining buttons here else if(source.equals("button1")){ button1.settext(text); playingfield[1] = tempturn; /** update the state of the game **/ else if(source.equals("button2")){ button2.settext(text); playingfield[2] = tempturn; /** update the state of the game **/ else if(source.equals("button3")){ button3.settext(text); playingfield[3] = tempturn; /** update the state of the game **/ else if(source.equals("button4")){ button4.settext(text); playingfield[4] = tempturn; /** update the state of the game **/ else if(source.equals("button5")){ button5.settext(text); playingfield[5] = tempturn; /** update the state of the game **/ else if(source.equals("button6")){ button6.settext(text); playingfield[6] = tempturn; /** update the state of the game **/ else if(source.equals("button7")){ button7.settext(text); playingfield[7] = tempturn; /** update the state of the game **/ else if(source.equals("button8")) { button8.settext(text); playingfield[8] = tempturn; /** update the state of the game **/ else if (source.equals("reset")){ if (source.equals("quit")){ /****************************************************************************** * getwinner() returns 0 if it is a tie, returns 1 if player 1 is winner, * * 2 if player 2 is winner and 3 if a winner cannot be determined at this time* * Based on the returned value set the text on label infolabel appropriately * ******************************************************************************/ int winner = getwinner();

5 if (winner==1){ JOptionPane.showMessageDialog(null, "Winner: Player1!"); else if(winner==2){ JOptionPane.showMessageDialog(null, "Winner: Player2!"); else if (winner==0){ JOptionPane.showMessageDialog(null, "Tie"); else{ //do nothing. /***************************************** * This method is complete! * * don't worry about all of this! * *****************************************/ public int getwinner(){ if((playingfield[0] == 1 && playingfield[1] == 1 && playingfield[2] == 1) (playingfield[0] == 1 && playingfield[3] == 1 && playingfield[6] == 1) (playingfield[0] == 1 && playingfield[4] == 1 && playingfield[8] == 1) (playingfield[1] == 1 && playingfield[4] == 1 && playingfield[7] == 1) (playingfield[2] == 1 && playingfield[5] == 1 && playingfield[8] == 1) (playingfield[3] == 1 && playingfield[4] == 1 && playingfield[5] == 1) (playingfield[6] == 1 && playingfield[7] == 1 && playingfield[8] == 1) (playingfield[2] == 1 && playingfield[4] == 1 && playingfield[6] == 1)){ return 1; else if((playingfield[0] == 2 && playingfield[1] == 2 && playingfield[2] == 2) (playingfield[0] == 2 && playingfield[3] == 2 && playingfield[6] == 2) (playingfield[0] == 2 && playingfield[4] == 2 && playingfield[8] == 2) (playingfield[1] == 2 && playingfield[4] == 2 && playingfield[7] == 2) (playingfield[2] == 2 && playingfield[5] == 2 && playingfield[8] == 2) (playingfield[3] == 2 && playingfield[4] == 2 && playingfield[5] == 2) (playingfield[6] == 2 && playingfield[7] == 2 && playingfield[8] == 2) (playingfield[2] == 2 && playingfield[4] == 2 && playingfield[6] == 2)){ else{ return 2; if(click == 9) return 0; /** Tie **/ else { return 3; /** Win/Tie cannot be determined yet **/ public static void main(string[] args) {

6 System.out.println("Starting the frame"); TicTacToe thegame = new TicTacToe();

INTRODUCTION TO COMPUTER PROGRAMMING. Richard Pierse. Class 7: Object-Oriented Programming. Introduction

INTRODUCTION TO COMPUTER PROGRAMMING. Richard Pierse. Class 7: Object-Oriented Programming. Introduction INTRODUCTION TO COMPUTER PROGRAMMING Richard Pierse Class 7: Object-Oriented Programming Introduction One of the key issues in programming is the reusability of code. Suppose that you have written a program

More information

5.17 GUI. Xiaoyi Jiang Informatik I Grundlagen der Programmierung

5.17 GUI. Xiaoyi Jiang Informatik I Grundlagen der Programmierung AWT vs. Swing AWT (Abstract Window Toolkit; Package java.awt) Benutzt Steuerelemente des darunterliegenden Betriebssystems Native Code (direkt für die Maschine geschrieben, keine VM); schnell Aussehen

More information

public class Craps extends JFrame implements ActionListener { final int WON = 0,LOST =1, CONTINUE = 2;

public class Craps extends JFrame implements ActionListener { final int WON = 0,LOST =1, CONTINUE = 2; Lecture 15 The Game of "Craps" In the game of "craps" a player throws a pair of dice. If the sum on the faces of the pair of dice after the first toss is 7 or 11 the player wins; if the sum on the first

More information

Programming with Java GUI components

Programming with Java GUI components Programming with Java GUI components Java includes libraries to provide multi-platform support for Graphic User Interface objects. The multi-platform aspect of this is that you can write a program on a

More information

// Correntista. //Conta Corrente. package Banco; public class Correntista { String nome, sobrenome; int cpf;

// Correntista. //Conta Corrente. package Banco; public class Correntista { String nome, sobrenome; int cpf; // Correntista public class Correntista { String nome, sobrenome; int cpf; public Correntista(){ nome = "zé"; sobrenome = "Pereira"; cpf = 123456; public void setnome(string n){ nome = n; public void setsobrenome(string

More information

Homework/Program #5 Solutions

Homework/Program #5 Solutions Homework/Program #5 Solutions Problem #1 (20 points) Using the standard Java Scanner class. Look at http://natch3z.blogspot.com/2008/11/read-text-file-using-javautilscanner.html as an exampleof using the

More information

Using A Frame for Output

Using A Frame for Output Eventos Roteiro Frames Formatting Output Event Handling Entering Data Using Fields in a Frame Creating a Data Entry Field Using a Field Reading Data in an Event Handler Handling Multiple Button Events

More information

CS 335 Lecture 06 Java Programming GUI and Swing

CS 335 Lecture 06 Java Programming GUI and Swing CS 335 Lecture 06 Java Programming GUI and Swing Java: Basic GUI Components Swing component overview Event handling Inner classes and anonymous inner classes Examples and various components Layouts Panels

More information

CSS 543 Program 3: Online Tic-Tac-Toe Game Professor: Munehiro Fukuda Due date: see the syllabus

CSS 543 Program 3: Online Tic-Tac-Toe Game Professor: Munehiro Fukuda Due date: see the syllabus CSS 543 Program 3: Online Tic-Tac-Toe Game Professor: Munehiro Fukuda Due date: see the syllabus 1. Purpose This assignment exercises how to write a peer-to-peer communicating program using non-blocking

More information

Advanced Network Programming Lab using Java. Angelos Stavrou

Advanced Network Programming Lab using Java. Angelos Stavrou Advanced Network Programming Lab using Java Angelos Stavrou Table of Contents A simple Java Client...3 A simple Java Server...4 An advanced Java Client...5 An advanced Java Server...8 A Multi-threaded

More information

Graphical User Interfaces

Graphical User Interfaces M14_REGE1813_02_SE_C14.qxd 2/10/10 3:43 PM Page 822 Chapter14 Graphical User Interfaces 14.1 GUI Basics Graphical Input and Output with Option Panes Working with Frames Buttons, Text Fields, and Labels

More information

Extending Desktop Applications to the Web

Extending Desktop Applications to the Web Extending Desktop Applications to the Web Arno Puder San Francisco State University Computer Science Department 1600 Holloway Avenue San Francisco, CA 94132 arno@sfsu.edu Abstract. Web applications have

More information

file://c:\dokumente und Einstellungen\Marco Favorito\Desktop\ScanCmds.html

file://c:\dokumente und Einstellungen\Marco Favorito\Desktop\ScanCmds.html file:c:\dokumente und Einstellungen\Marco Favorito\Desktop\ScanCmds.html Seite 1 von 5 ScanCmds.java ------------------------------------------------------------------------------- ScanCmds Demontration

More information

Essentials of the Java(TM) Programming Language, Part 1

Essentials of the Java(TM) Programming Language, Part 1 Essentials of the Java(TM) Programming Language, Part 1 http://developer.java.sun.com/developer...ining/programming/basicjava1/index.html Training Index Essentials of the Java TM Programming Language:

More information

During the process of creating ColorSwitch, you will learn how to do these tasks:

During the process of creating ColorSwitch, you will learn how to do these tasks: GUI Building in NetBeans IDE 3.6 This short tutorial guides you through the process of creating an application called ColorSwitch. You will build a simple program that enables you to switch the color of

More information

GUIs with Swing. Principles of Software Construction: Objects, Design, and Concurrency. Jonathan Aldrich and Charlie Garrod Fall 2012

GUIs with Swing. Principles of Software Construction: Objects, Design, and Concurrency. Jonathan Aldrich and Charlie Garrod Fall 2012 GUIs with Swing Principles of Software Construction: Objects, Design, and Concurrency Jonathan Aldrich and Charlie Garrod Fall 2012 Slides copyright 2012 by Jeffrey Eppinger, Jonathan Aldrich, William

More information

http://netbeans.org/kb/docs/java/gui-functionality.html?print=yes

http://netbeans.org/kb/docs/java/gui-functionality.html?print=yes Page 1 of 6 Introduction to GUI Building Contributed by Saleem Gul and Tomas Pavek, maintained by Ruth Kusterer and Irina Filippova This beginner tutorial teaches you how to create a simple graphical user

More information

The Abstract Windowing Toolkit. Java Foundation Classes. Swing. In April 1997, JavaSoft announced the Java Foundation Classes (JFC).

The Abstract Windowing Toolkit. Java Foundation Classes. Swing. In April 1997, JavaSoft announced the Java Foundation Classes (JFC). The Abstract Windowing Toolkit Since Java was first released, its user interface facilities have been a significant weakness The Abstract Windowing Toolkit (AWT) was part of the JDK form the beginning,

More information

Callbacks. Callbacks Copyright 2007 by Ken Slonneger 1

Callbacks. Callbacks Copyright 2007 by Ken Slonneger 1 Callbacks Callbacks refer to a mechanism in which a library or utility class provides a service to clients that are unknown to it when it is defined. Suppose, for example, that a server class creates a

More information

How Scala Improved Our Java

How Scala Improved Our Java How Scala Improved Our Java Sam Reid PhET Interactive Simulations University of Colorado http://spot.colorado.edu/~reids/ PhET Interactive Simulations Provides free, open source educational science simulations

More information

The Basic Java Applet and JApplet

The Basic Java Applet and JApplet I2PUJ4 - Chapter 6 - Applets, HTML, and GUI s The Basic Java Applet and JApplet Rob Dempster robd@cs.ukzn.ac.za School of Computer Science University of KwaZulu-Natal Pietermaritzburg Campus I2PUJ4 - Chapter

More information

Tutorial: Time Of Day Part 2 GUI Design in NetBeans

Tutorial: Time Of Day Part 2 GUI Design in NetBeans Tutorial: Time Of Day Part 2 GUI Design in NetBeans October 7, 2010 Author Goals Kees Hemerik / Gerard Zwaan Getting acquainted with NetBeans GUI Builder Illustrate the separation between GUI and computation

More information

Lösningsförslag till tentamen 121217

Lösningsförslag till tentamen 121217 Uppgift 1 Lösningsförslag till tentamen 121217 a) Utskriften blir: a = 5 och b = 10 a = 5 och b = 10 b) Utskriften blir 1 2 3 4 5 5 2 3 4 1 c) Utskriften blir 321 Uppgift 2 Med användning av dialogrutor:

More information

How To Build A Swing Program In Java.Java.Netbeans.Netcode.Com (For Windows) (For Linux) (Java) (Javax) (Windows) (Powerpoint) (Netbeans) (Sun) (

How To Build A Swing Program In Java.Java.Netbeans.Netcode.Com (For Windows) (For Linux) (Java) (Javax) (Windows) (Powerpoint) (Netbeans) (Sun) ( Chapter 11. Graphical User Interfaces To this point in the text, our programs have interacted with their users to two ways: The programs in Chapters 1-5, implemented in Processing, displayed graphical

More information

Essentials of the Java Programming Language

Essentials of the Java Programming Language Essentials of the Java Programming Language A Hands-On Guide by Monica Pawlan 350 East Plumeria Drive San Jose, CA 95134 USA May 2013 Part Number TBD v1.0 Sun Microsystems. Inc. All rights reserved If

More information

Swing. A Quick Tutorial on Programming Swing Applications

Swing. A Quick Tutorial on Programming Swing Applications Swing A Quick Tutorial on Programming Swing Applications 1 MVC Model View Controller Swing is based on this design pattern It means separating the implementation of an application into layers or components:

More information

Fondamenti di Java. Introduzione alla costruzione di GUI (graphic user interface)

Fondamenti di Java. Introduzione alla costruzione di GUI (graphic user interface) Fondamenti di Java Introduzione alla costruzione di GUI (graphic user interface) component - container - layout Un Container contiene [0 o +] Components Il Layout specifica come i Components sono disposti

More information

Assignment # 2: Design Patterns and GUIs

Assignment # 2: Design Patterns and GUIs CSUS COLLEGE OF ENGINEERING AND COMPUTER SCIENCE Department of Computer Science CSc 133 Object-Oriented Computer Graphics Programming Spring 2014 John Clevenger Assignment # 2: Design Patterns and GUIs

More information

1 Hour, Closed Notes, Browser open to Java API docs is OK

1 Hour, Closed Notes, Browser open to Java API docs is OK CSCI 143 Exam 2 Name 1 Hour, Closed Notes, Browser open to Java API docs is OK A. Short Answer For questions 1 5 credit will only be given for a correct answer. Put each answer on the appropriate line.

More information

JiST Graphical User Interface Event Viewer. Mark Fong mjf21@cornell.edu

JiST Graphical User Interface Event Viewer. Mark Fong mjf21@cornell.edu JiST Graphical User Interface Event Viewer Mark Fong mjf21@cornell.edu Table of Contents JiST Graphical User Interface Event Viewer...1 Table of Contents...2 Introduction...3 What it does...3 Design...3

More information

The Design and Implementation of Multimedia Software

The Design and Implementation of Multimedia Software Chapter 3 Programs The Design and Implementation of Multimedia Software David Bernstein Jones and Bartlett Publishers www.jbpub.com David Bernstein (jbpub.com) Multimedia Software Jones and Bartlett 1

More information

Analysis Of Source Lines Of Code(SLOC) Metric

Analysis Of Source Lines Of Code(SLOC) Metric Analysis Of Source Lines Of Code(SLOC) Metric Kaushal Bhatt 1, Vinit Tarey 2, Pushpraj Patel 3 1,2,3 Kaushal Bhatt MITS,Datana Ujjain 1 kaushalbhatt15@gmail.com 2 vinit.tarey@gmail.com 3 pushpraj.patel@yahoo.co.in

More information

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. 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

More information

Skills and Topics for TeenCoder: Java Programming

Skills and Topics for TeenCoder: Java Programming Skills and Topics for TeenCoder: Java Programming Our Self-Study Approach Our courses are self-study and can be completed on the student's own computer, at their own pace. You can steer your student in

More information

Schueler-Organisiertes Lernen am Beispiel von Grafischen Benutzer-Schnittstellen in Java Tag der Offenen Tür - GTS 2008

Schueler-Organisiertes Lernen am Beispiel von Grafischen Benutzer-Schnittstellen in Java Tag der Offenen Tür - GTS 2008 Schueler-Organisiertes Lernen am Beispiel von Grafischen Benutzer-Schnittstellen in Java Tag der Offenen Tür - GTS 2008 http://worgtsone.scienceontheweb.net/worgtsone/ - mailto: worgtsone @ hush.com Sa

More information

Cours de Java. Sciences-U Lyon. Java - Introduction Java - Fondamentaux Java Avancé. http://www.rzo.free.fr

Cours de Java. Sciences-U Lyon. Java - Introduction Java - Fondamentaux Java Avancé. http://www.rzo.free.fr Cours de Java Sciences-U Lyon Java - Introduction Java - Fondamentaux Java Avancé http://www.rzo.free.fr Pierre PARREND 1 Octobre 2004 Sommaire Java Introduction Java Fondamentaux Java Avancé GUI Graphical

More information

public class demo1swing extends JFrame implements ActionListener{

public class demo1swing extends JFrame implements ActionListener{ import java.io.*; import java.net.*; import java.io.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class demo1swing extends JFrame implements ActionListener JButton demodulacion;

More information

Introduction to Object-Oriented Programming

Introduction to Object-Oriented Programming Introduction to Object-Oriented Programming Programs and Methods Christopher Simpkins chris.simpkins@gatech.edu CS 1331 (Georgia Tech) Programs and Methods 1 / 8 The Anatomy of a Java Program It is customary

More information

Konzepte objektorientierter Programmierung

Konzepte objektorientierter Programmierung Konzepte objektorientierter Programmierung Prof. Dr. Peter Müller Werner Dietl Software Component Technology Exercises 5: Frameworks Wintersemester 05/06 2 Homework 1 Observer Pattern From: Gamma, Helm,

More information

AP COMPUTER SCIENCE A 2007 SCORING GUIDELINES

AP COMPUTER SCIENCE A 2007 SCORING GUIDELINES AP COMPUTER SCIENCE A 2007 SCORING GUIDELINES Question 4: Game Design (Design) Part A: RandomPlayer 4 points +1/2 class RandomPlayer extends Player +1 constructor +1/2 public RandomPlayer(String aname)

More information

Nexawebホワイトペーパー. Developing with Nexaweb ~ Nexaweb to Improve Development Productivity and Maintainability

Nexawebホワイトペーパー. Developing with Nexaweb ~ Nexaweb to Improve Development Productivity and Maintainability Nexawebホワイトペーパー Developing with Nexaweb ~ Nexaweb to Improve Development Productivity and Maintainability Nexaweb Technologies, Inc. February 2012 Overview Many companies today are creating rich internet

More information

To export data formatted for Avery labels -

To export data formatted for Avery labels - Information used to create labels in the Client Data System (CDS) can be exported out of CDS and used to create labels in Microsoft Word, making it possible to customize the font style, size, and color.

More information

LAB4 Making Classes and Objects

LAB4 Making Classes and Objects LAB4 Making Classes and Objects Objective The main objective of this lab is class creation, how its constructer creation, object creation and instantiation of objects. We will use the definition pane to

More information

AP Computer Science Java Mr. Clausen Program 9A, 9B

AP Computer Science Java Mr. Clausen Program 9A, 9B AP Computer Science Java Mr. Clausen Program 9A, 9B PROGRAM 9A I m_sort_of_searching (20 points now, 60 points when all parts are finished) The purpose of this project is to set up a program that will

More information

Tutorial Reference Manual. Java WireFusion 4.1

Tutorial Reference Manual. Java WireFusion 4.1 Tutorial Reference Manual Java WireFusion 4.1 Contents INTRODUCTION...1 About this Manual...2 REQUIREMENTS...3 User Requirements...3 System Requirements...3 SHORTCUTS...4 DEVELOPMENT ENVIRONMENT...5 Menu

More information

Assignment No.3. /*-- Program for addition of two numbers using C++ --*/

Assignment No.3. /*-- Program for addition of two numbers using C++ --*/ Assignment No.3 /*-- Program for addition of two numbers using C++ --*/ #include class add private: int a,b,c; public: void getdata() couta; cout

More information

GUI Event-Driven Programming

GUI Event-Driven Programming GUI Event-Driven Programming CSE 331 Software Design & Implementation Slides contain content by Hal Perkins and Michael Hotan 1 Outline User events and callbacks Event objects Event listeners Registering

More information

Once you have obtained a username and password you must open one of the compatible web browsers and go to the following address to begin:

Once you have obtained a username and password you must open one of the compatible web browsers and go to the following address to begin: CONTENT MANAGER GUIDELINES Content Manager is a web-based application created by Scala that allows users to have the media they upload be sent out to individual players in many locations. It includes many

More information

How To Write A Program For The Web In Java (Java)

How To Write A Program For The Web In Java (Java) 21 Applets and Web Programming As noted in Chapter 2, although Java is a general purpose programming language that can be used to create almost any type of computer program, much of the excitement surrounding

More information

Principles of Software Construction: Objects, Design and Concurrency. GUIs with Swing. toad 15-214. Spring 2013

Principles of Software Construction: Objects, Design and Concurrency. GUIs with Swing. toad 15-214. Spring 2013 Principles of Software Construction: Objects, Design and Concurrency GUIs with Swing 15-214 toad Spring 2013 Christian Kästner Charlie Garrod School of Computer Science 2012-13 C Garrod, C Kästner, J Aldrich,

More information

Tema: Encriptación por Transposición

Tema: Encriptación por Transposición import java.awt.*; import java.awt.event.*; import javax.swing.*; public class PrincipalSO extends JApplet implements ActionListener { // Declaración global JLabel lblclave, lblencriptar, lblencriptado,

More information

Informatik II. // ActionListener hinzufügen btnconvert.addactionlistener(this); super.setdefaultcloseoperation(jframe.

Informatik II. // ActionListener hinzufügen btnconvert.addactionlistener(this); super.setdefaultcloseoperation(jframe. Universität Augsburg, Institut für Informatik Sommersemester 2006 Prof. Dr. Werner Kießling 20. Juli. 2006 M. Endres, A. Huhn, T. Preisinger Lösungsblatt 11 Aufgabe 1: Währungsrechner CurrencyConverter.java

More information

JIDE Action Framework Developer Guide

JIDE Action Framework Developer Guide JIDE Action Framework Developer Guide Contents PURPOSE OF THIS DOCUMENT... 1 WHAT IS JIDE ACTION FRAMEWORK... 1 PACKAGES... 3 MIGRATING FROM EXISTING APPLICATIONS... 3 DOCKABLEBARMANAGER... 9 DOCKABLE

More information

ICOM 4015: Advanced Programming

ICOM 4015: Advanced Programming ICOM 4015: Advanced Programming Lecture 10 Reading: Chapter Ten: Inheritance Copyright 2009 by John Wiley & Sons. All rights reserved. Chapter 10 Inheritance Chapter Goals To learn about inheritance To

More information

How to Convert an Application into an Applet.

How to Convert an Application into an Applet. How to Convert an Application into an Applet. A java application contains a main method. An applet is a java program part of a web page and runs within a browser. I am going to show you three different

More information

Chapter 2 Introduction to Java programming

Chapter 2 Introduction to Java programming Chapter 2 Introduction to Java programming 1 Keywords boolean if interface class true char else package volatile false byte final switch while throws float private case return native void protected break

More information

Create Charts in Excel

Create Charts in Excel Create Charts in Excel Table of Contents OVERVIEW OF CHARTING... 1 AVAILABLE CHART TYPES... 2 PIE CHARTS... 2 BAR CHARTS... 3 CREATING CHARTS IN EXCEL... 3 CREATE A CHART... 3 HOW TO CHANGE THE LOCATION

More information

COSC 111: Computer Programming I. Dr. Bowen Hui University of Bri>sh Columbia Okanagan

COSC 111: Computer Programming I. Dr. Bowen Hui University of Bri>sh Columbia Okanagan COSC 111: Computer Programming I Dr. Bowen Hui University of Bri>sh Columbia Okanagan 1 Today Review slides from week 2 Review another example with classes and objects Review classes in A1 2 Discussion

More information

Java Appletek II. Applet GUI

Java Appletek II. Applet GUI THE INTERNET,mapped on the opposite page, is a scalefree network in that Java Appletek II. dis.'~tj port,from BYALBERTU\SZLOBARABASI ANDERICBONABEAU THE INTERNET,mapped on the opposite page, is a scalefree

More information

Illustration 1: An applet showing constructed responses in an intuitive mode. Note the misprint!

Illustration 1: An applet showing constructed responses in an intuitive mode. Note the misprint! Applets in Java using NetBeans as an IDE (Part 1) C.W. David Department of Chemistry University of Connecticut Storrs, CT 06269-3060 Carl.David@uconn.edu We are interested in creating a teaching/testing

More information

D06 PROGRAMMING with JAVA

D06 PROGRAMMING with JAVA Cicles Formatius de Grau Superior Desenvolupament d Aplicacions Informàtiques D06 PROGRAMMING with JAVA Ch11 Interfaces & Polymorphism PowerPoint presentation, created by Angel A. Juan - ajuanp(@)gmail.com,

More information

Java GUI Programming. Building the GUI for the Microsoft Windows Calculator Lecture 2. Des Traynor 2005

Java GUI Programming. Building the GUI for the Microsoft Windows Calculator Lecture 2. Des Traynor 2005 Java GUI Programming Building the GUI for the Microsoft Windows Calculator Lecture 2 Des Traynor 2005 So, what are we up to Today, we are going to create the GUI for the calculator you all know and love.

More information

2. Create the User Interface: Open ViewController.xib or MainStoryBoard.storyboard by double clicking it.

2. Create the User Interface: Open ViewController.xib or MainStoryBoard.storyboard by double clicking it. A Tic-Tac-Toe Example Application 1. Create a new Xcode Single View Application project. Call it something like TicTacToe or another title of your choice. Use the Storyboard support and enable Automatic

More information

Introduction to the Java Programming Language

Introduction to the Java Programming Language Software Design Introduction to the Java Programming Language Material drawn from [JDK99,Sun96,Mitchell99,Mancoridis00] Java Features Write Once, Run Anywhere. Portability is possible because of Java virtual

More information

Karsten Lentzsch JGoodies SWING WITH STYLE

Karsten Lentzsch JGoodies SWING WITH STYLE Karsten Lentzsch JGoodies SWING WITH STYLE JGoodies: Karsten Lentzsch Open source Swing libraries Example applications Consultant for Java desktop Design assistance Training for visual design and implementation

More information

Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game

Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game Directions: In mobile Applications the Control Model View model works to divide the work within an application.

More information

Altas, Bajas y Modificaciones de Registros en tabla MYSQL

Altas, Bajas y Modificaciones de Registros en tabla MYSQL Altas, Bajas y Modificaciones de Registros en tabla MYSQL 1. En MySql crear una base de datos de nombre EmpresaABC y dentro de ella la tabla Empleados con la siguiente estructura: DNI integer(8) Definir

More information

Trigger. Perform this procedure when using the CRM Worklist. Helpful Hints

Trigger. Perform this procedure when using the CRM Worklist. Helpful Hints Purpose The purpose of this Work Instruction is to navigate the CRM Worklist and identify tools required to process and complete workflow tasks and alerts. Trigger Perform this procedure when using the

More information

Appendix B Task 2: questionnaire and artefacts

Appendix B Task 2: questionnaire and artefacts Appendix B Task 2: questionnaire and artefacts This section shows the questionnaire, the UML class and sequence diagrams, and the source code provided for the task 1 (T2) Buy a Ticket Unsuccessfully. It

More information

Dev Articles 05/25/07 11:07:33

Dev Articles 05/25/07 11:07:33 Java Crawling the Web with Java Contributed by McGraw Hill/Osborne 2005 06 09 Access Your PC from Anywhere Download Your Free Trial Take your office with you, wherever you go with GoToMyPC. It s the remote

More information

How To Use The Command Pattern In Java.Com (Programming) To Create A Program That Is Atomic And Is Not A Command Pattern (Programmer)

How To Use The Command Pattern In Java.Com (Programming) To Create A Program That Is Atomic And Is Not A Command Pattern (Programmer) CS 342: Object-Oriented Software Development Lab Command Pattern and Combinations David L. Levine Christopher D. Gill Department of Computer Science Washington University, St. Louis levine,cdgill@cs.wustl.edu

More information

Handout 3 cs180 - Programming Fundamentals Spring 15 Page 1 of 6. Handout 3. Strings and String Class. Input/Output with JOptionPane.

Handout 3 cs180 - Programming Fundamentals Spring 15 Page 1 of 6. Handout 3. Strings and String Class. Input/Output with JOptionPane. Handout 3 cs180 - Programming Fundamentals Spring 15 Page 1 of 6 Handout 3 Strings and String Class. Input/Output with JOptionPane. Strings In Java strings are represented with a class type String. Examples:

More information

5.7. Quick Guide to Fusion Pro Schedule

5.7. Quick Guide to Fusion Pro Schedule 5.7 Quick Guide to Fusion Pro Schedule Quick Guide to Fusion Pro Schedule Fusion 5.7 This publication may not be reproduced, in whole or in part, in any form or by any electronic, manual, or other method

More information

Arrays in Java. data in bulk

Arrays in Java. data in bulk Arrays in Java data in bulk Array Homogeneous collection of elements all same data type can be simple type or object type Each element is accessible via its index (random access) Arrays are, loosely speaking,

More information

GUI Components: Part 2

GUI Components: Part 2 GUI Components: Part 2 JComboBox and Using an Anonymous Inner Class for Event Handling A combo box (or drop-down list) enables the user to select one item from a list. Combo boxes are implemented with

More information

TopBest Documentation Guide

TopBest Documentation Guide TopBest Documentation Guide Theme Options Theme Options is the core of the theme itself, everything is controlled in the using the theme options. To access the theme options go to your wordpress admin

More information

Java is commonly used for deploying applications across a network. Compiled Java code

Java is commonly used for deploying applications across a network. Compiled Java code Module 5 Introduction to Java/Swing Java is commonly used for deploying applications across a network. Compiled Java code may be distributed to different machine architectures, and a native-code interpreter

More information

Here's the code for our first Applet which will display 'I love Java' as a message in a Web page

Here's the code for our first Applet which will display 'I love Java' as a message in a Web page Create a Java Applet Those of you who purchased my latest book, Learn to Program with Java, know that in the book, we create a Java program designed to calculate grades for the English, Math and Science

More information

Setting Up Outlook on Workstation to Capture Emails

Setting Up Outlook on Workstation to Capture Emails Setting Up Outlook on Workstation to Capture Emails Setting up Outlook to allow email to pass directly to M-Files requires a number of steps to assure that all of the data required is sent to the correct

More information

EDIT202 PowerPoint Lab Assignment Guidelines

EDIT202 PowerPoint Lab Assignment Guidelines EDIT202 PowerPoint Lab Assignment Guidelines 1. Create a folder named LABSEC-CCID-PowerPoint. 2. Download the PowerPoint-Sample.avi video file from the course WebCT/Moodle site and save it into your newly

More information

Outlook 2013 ~ e Mail Quick Tips

Outlook 2013 ~ e Mail Quick Tips The Ribbon: Home tab New Email to send a new mail New Items to send a new mail, a new appointment, a new meeting, a new contact, a new task, a new Lync Meeting Ignore to ignore a request Clean Up to clean

More information

Scatter Plots with Error Bars

Scatter Plots with Error Bars Chapter 165 Scatter Plots with Error Bars Introduction The procedure extends the capability of the basic scatter plot by allowing you to plot the variability in Y and X corresponding to each point. Each

More information

Licensed for viewing only. Printing is prohibited. For hard copies, please purchase from www.agileskills.org

Licensed for viewing only. Printing is prohibited. For hard copies, please purchase from www.agileskills.org Unit Test 301 CHAPTER 12Unit Test Unit test Suppose that you are writing a CourseCatalog class to record the information of some courses: class CourseCatalog { CourseCatalog() { void add(course course)

More information

Object Oriented Programming with Java. School of Computer Science University of KwaZulu-Natal

Object Oriented Programming with Java. School of Computer Science University of KwaZulu-Natal Object Oriented Programming with Java School of Computer Science University of KwaZulu-Natal January 30, 2006 2 Object Oriented Programming with Java Notes for the Computer Science Module Object Oriented

More information

Designing Reports in Access

Designing Reports in Access Designing Reports in Access This document provides basic techniques for designing reports in Microsoft Access. Opening Comments about Reports Reports are a great way to organize and present data from your

More information

DHBW Karlsruhe, Vorlesung Programmieren, Remote Musterlösungen

DHBW Karlsruhe, Vorlesung Programmieren, Remote Musterlösungen DHBW Karlsruhe, Vorlesung Programmieren, Remote Musterlösungen Aufgabe 1 RMI - TimeService public interface TimeServerInterface extends Remote { public String gettime() throws RemoteException; import java.util.date;

More information

Section 6 Spring 2013

Section 6 Spring 2013 Print Your Name You may use one page of hand written notes (both sides) and a dictionary. No i-phones, calculators or any other type of non-organic computer. Do not take this exam if you are sick. Once

More information

Copyright 2008 The Pragmatic Programmers, LLC.

Copyright 2008 The Pragmatic Programmers, LLC. Extracted from: Stripes... and Java Web Development Is Fun Again This PDF file contains pages extracted from Stripes, published by the Pragmatic Bookshelf. For more information or to purchase a paperback

More information

Introduction to Microsoft Excel 2007/2010

Introduction to Microsoft Excel 2007/2010 to Microsoft Excel 2007/2010 Abstract: Microsoft Excel is one of the most powerful and widely used spreadsheet applications available today. Excel's functionality and popularity have made it an essential

More information

Egnyte Single Sign-On (SSO) Configuration for Active Directory Federation Services (ADFS)

Egnyte Single Sign-On (SSO) Configuration for Active Directory Federation Services (ADFS) w w w. e g n y t e. c o m Egnyte Single Sign-On (SSO) Configuration for Active Directory Federation Services (ADFS) To set up ADFS so that your employees can access Egnyte using their ADFS credentials,

More information

GOPAL RAMALINGAM MEMORIAL ENGINEERING COLLEGE. Rajeshwari nagar, Panapakkam, Near Padappai, Chennai-601301.

GOPAL RAMALINGAM MEMORIAL ENGINEERING COLLEGE. Rajeshwari nagar, Panapakkam, Near Padappai, Chennai-601301. GOPAL RAMALINGAM MEMORIAL ENGINEERING COLLEGE Rajeshwari nagar, Panapakkam, Near Padappai, Chennai-601301. DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING OOAD LAB MANUAL Sub. Code/Sub. Name: CS2357-Object

More information

Ecommerce and PayPal Shopping Cart

Ecommerce and PayPal Shopping Cart 1 of 5 Ecommerce and PayPal Shopping Cart NOTE: If you do not see the "SETTINGS" tab at the top of your editor and you need to make a change or add shopping cart functionality, please send a request to

More information

CS170 Lab 11 Abstract Data Types & Objects

CS170 Lab 11 Abstract Data Types & Objects CS170 Lab 11 Abstract Data Types & Objects Introduction: Abstract Data Type (ADT) An abstract data type is commonly known as a class of objects An abstract data type in a program is used to represent (the

More information

Using NetBeans IDE for Desktop Development. Geertjan Wielenga http://blogs.sun.com/geertjan

Using NetBeans IDE for Desktop Development. Geertjan Wielenga http://blogs.sun.com/geertjan Using NetBeans IDE for Desktop Development Geertjan Wielenga http://blogs.sun.com/geertjan Agenda Goals Design: Matisse GUI Builder Medium Applications: JSR-296 Tooling Large Applications: NetBeans Platform

More information

Developing GUI Applications: Architectural Patterns Revisited

Developing GUI Applications: Architectural Patterns Revisited Developing GUI Applications: Architectural Patterns Revisited A Survey on MVC, HMVC, and PAC Patterns Alexandros Karagkasidis karagkasidis@gmail.com Abstract. Developing large and complex GUI applications

More information

Collections.sort(population); // Método de ordenamiento

Collections.sort(population); // Método de ordenamiento import java.util.collections; import java.util.linkedlist; import java.util.random; public class GeneticAlgorithms static long BEGIN; static final boolean _DEBUG = true; LinkedList population

More information

Getting Started with Access 2007

Getting Started with Access 2007 Getting Started with Access 2007 1 A database is an organized collection of information about a subject. Examples of databases include an address book, the telephone book, or a filing cabinet full of documents

More information

Visualising Java Data Structures as Graphs

Visualising Java Data Structures as Graphs Visualising Java Data Structures as Graphs John Hamer Department of Computer Science University of Auckland J.Hamer@cs.auckland.ac.nz John Hamer, January 15, 2004 ACE 2004 Visualising Java Data Structures

More information

Java: overview by example

Java: overview by example Chair of Software Engineering Carlo A. Furia, Marco Piccioni, Bertrand Meyer Java: overview by example Bank Account A Bank Account maintain a balance (in CHF) of the total amount of money balance can go

More information

Lab 9. Spam, Spam, Spam. Handout 11 CSCI 134: Spring, 2015. To gain experience with Strings. Objective

Lab 9. Spam, Spam, Spam. Handout 11 CSCI 134: Spring, 2015. To gain experience with Strings. Objective Lab 9 Handout 11 CSCI 134: Spring, 2015 Spam, Spam, Spam Objective To gain experience with Strings. Before the mid-90s, Spam was a canned meat product. These days, the term spam means just one thing unwanted

More information