Composite Objects with Object Editor With slides from Andrew Ghobrial

Slides:



Advertisements
Similar presentations
Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
Advertisements

Finite Element Method FEM Dr. Mohammed Al-Hazmi ANSYS Basics Lecture 4.
Scite Scintilla integrated text editor. Click here.
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
1 Computing for Todays Lecture 22 Yumei Huo Fall 2006.
Week 5 Recap CSE 115 Spring Composition Informally called “has a” Represented in UML with a diamond- headed arc In code: Declare an instance variable.
 The BPEL Module project is a group of source files which includes BPEL files, WSDL files, and XML schema files. Within a BPEL Module project, you can.
Integrated Development Environment (IDE)
CREATING WEB PAGES Using…More HTML code! My First \ Web Page.
Copyright © Curt Hill First Window Builder Program Easy GUIs in Eclipse.
Creating and running a Java program. Eclipse Interactive Development Environment (IDE)  Eclipse is an Interactive Development Environment (IDE) for Java.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
An Introduction to Programming with C++ Sixth Edition Chapter 14 Sequential Access Files.
SilkTest 2008 R2 SP1: Silk4J Introduction. ConfidentialCopyright © 2008 Borland Software Corporation. 2 What is Silk4J? Silk4J enables you to create functional.
GoodOO Programming Practice in Java © Allan C. Milne v
Recitation 7 Collections. Array List and Linked List Array List and Linked List are implementations of the same interface: List. As a result, they have.
Embedding Chime Structures in PowerPoint Presentation LiveWeb needs to be installed to view this presentation.
Access Module Implementing a Database with Microsoft Access A Great Module on Your CD.
Recitation 5 September 23, As you come in...  Please sit next to someone you will collaborate with for today’s recitation.  Choose someone with.
XP New Perspectives on Creating Web Pages With Word Tutorial 1 1 Creating Web Pages With Word Tutorial 1.
Java IDE Dwight Deugo Nesa Matic
XP Creating Web Pages with Microsoft Office
Object Oriented Programming. Constructors  Constructors are like special methods that are called implicitly as soon as an object is instantiated (i.e.
Author: Loh Jianxiong Christopher Contributions: Chua Jie Sheng, Li Mengran, Peh Shao Hong, Oo Theong Siang, Tong Chun Kit, Tania Chattopadhyay.
Dive Into® Visual Basic 2010 Express
Using “So what is the Truth” Template
INF230 Basics in C# Programming
Display Ratios The Student Union displays have ratios of 16:9
Release Numbers MATLAB is updated regularly
Working in the Forms Developer Environment
Module Road Map Refactoring Why Refactoring? Examples
Graphical User Interface in MATLAB
Chapter 1: An Introduction to Visual Basic 2015
Visual Basic Code & No.: CS 218
Tutorial: How to Creat a Website.
Recitation #3 Comp Semion Piskarev.
3.01 Apply Controls Associated With Visual Studio Form
Unit 8.2 How data can be used Accessing Data in Views
How to design a Windows Forms application
3.01 Apply Controls Associated With Visual Studio Form
Using Procedures and Exception Handling
Methods The real power of an object-oriented programming language takes place when you start to manipulate objects. A method defines an action that allows.
One class is an extension of another.
Some Tips for Using Eclipse
Social Media And Global Computing Introduction to Visual Studio
Week 1 Computer Programming Year 9 – Unit 9.04
Recitation 4 Comp
Using the Multiple Choice Template
Understanding the Visual IDE
How to Run a Java Program
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Embedding Graphics in Web Pages
Beans and object editor
Digital Image Processing
Using “So what is the Truth” Template
Recitation 7 October 7, 2011.
The Web Wizard’s Guide To JavaScript
Review Session Biggest discrepancy questions
Microsoft Office Access 2003
HTML Text editors and adding graphics
Accessing Databases with ADO.NET, Handling Exceptions, and Printing
Matlab.
European Computer Driving Licence
Using screens and adding two numbers - addda.cbl
Recitation 5 In this recitation you will have an example on displaying multiple objects on ObjectEditor. The code can be found in the recitation page.
Java IDE Dwight Deugo Nesa Matic Portions of the notes for this lecture include excerpts from.
Properties and Collections
Quiz Mrs. Witham May 4, 2017.
Microsoft Office Illustrated Fundamentals
Chapter 8 Objects and Classes Part 2
Presentation transcript:

Composite Objects with Object Editor With slides from Andrew Ghobrial Recitation 5 Composite Objects with Object Editor With slides from Andrew Ghobrial

Composite objects and ObjectEditor A composite object has properties that are objects (that is, non-primitive values) In this recitation you will have an example of a composite object whose class is called AUniverse. You will change the class of the composite object. You will use ObjectEditor to view the changed and unchanged object. The code can be found on the recitation page.

AUniverse Class AUniverse is the class of the composite object which implements the interface Universe To ensure that ObjectEditor can “see” the components of the composite object every component needs to be a property (i.e. it must have a getter, and potentially a setter). The line object theLine and point object lineLocation: theLine takes lineLocation as its X and Y. As a result, every time you set a new value for lineLocation, theLine will also move.

AStringShape and AShapeImage AStringShape and AShapeImage are objects that displays a string text and an image respectively. Both of them have a String property called Text and ImageFileName, which represents the string text or the filename of the image, respectively. These two properties need to be initialized before the getters that access them are called. (Otherwise ObjectEditor cannot display them.) The image file named by AShapeImage has to be located in the project folder, not in the package, not in the src folder.

Try these out Modify the constants of AUniverse, use some different values to initialize the component objects. Modify the constant that is being used in the constructor of AStringShape Uncomment the annotation @Visible(false) And import util.annotations.Visible;

Use the tree view to observe the textual values of all components of the composite object and its (logical) structure. Try changing the values in the tree view, and observe the effects in the graphics view. When ObjectEditor is running, notice the menu bar, under the list AUniverse, you can see a list of methods. They are actually public methods in AUniverse (except setters and getters). Try to use these methods to control these objects. You will need to use menu in next assignment.

“Assignment” Add a method to AUniverse that allows you to close the ObjectEditor from the menu An easy way to do this is to utilize the System.exit(0) command The Quiz assumes that you have finished this assignment before attempting to answer the questions Try putting the annotation @Postion(0) above the close() method you created Make sure you also add import util.annotations.Position; (Or press ctrl+shift+o to automatically do it)