ACO 101 Instantiating Graphic Objects. Review: 4 Phases to the Development Lifecycle Inception...

23
ACO 101 Instantiating Graphic Objects

Transcript of ACO 101 Instantiating Graphic Objects. Review: 4 Phases to the Development Lifecycle Inception...

ACO 101

Instantiating Graphic Objects

Review: 4 Phases to the Development Lifecycle

• Inception (Analysis & Design)– Business Requirements

• Business Analyst• Game designers

– Technical Specifications• Programmers

• Elaboration (Design)– Functional specification document – Project Manager

• Construction (Implementation)– Programmers– Animators/Modelers

• Transition (Testing and Deployment)

– Programmers– Testers– Project Manager

Review: Object Oriented Abstraction : aka Entity Abstraction

Review: Identifying ClassesDuring design, you need to identify the classes. Classes are used to model

things:

• Tangible things in the design: nouns, such as– purse, mailbox, bank account, keypad, email message

• Users– Student, Administrator, Bank Manager

• Agents ("-er" or "-or" words)– Scanner, file reader, sentence reader, CSVreader– agents perform some operation (sentence reader)

• Events and Transactions– Button click, ATM Withdrawal, Register for Course are all events– transactions are uses for interactions between classes, usually contain

info that doesn't "belong" in a thing class

Identify the modules and abstract

Review… UML Class Diagrams[a visual modeling tool]

BankAccount

nameaccountIDbalance

getBalance( )credit( double amount )debit( double amount )getName( )

A UML class diagram

The methods = what it DOES

The Class Name

The attributes or state = what it KNOWS

Review: What a Sequence Diagram looks like

Moving forward: Why do you need to understand the graphic objects?

1. The business has no time and wants its technology to spontaneously generate visual reports to give them data to make decisions

2. Data visualization is in its infancy 3. being able to abstract a problem effectively is

a rare skill

Data Visualization

• http://www.ted.com/talks/lang/eng/jonathan_harris_collects_stories.html

Lets get started:Location of the API [again]

• http://download.oracle.com/javase/7/docs/api/index.html

Graphic objects to work with

The stage is an object

The paper that you used for your rectangle drawing is an object

• Paper = Stage– What is the same object as the paper?– Answer – the JFrame

JFrame: fields

JFrame: constructor

JFrame: methods

JFrame: more methods

JFrame: more methods

Rectangle

• For a square use the rectangle and make the height and width the same value

Rectangle: The fields [holds the state]

Rectangle: the methods [what it does]

Rectangle: The constructor overloads

Homework

• Wiley plus code completion assignment: More Rectangles– If you seek help from the tutor – you must have class diagrams

of the objects you intend to use to show to attain her help.• Pick out the fields, constructor and the methods you intend to use in

the Jframe and the Rectangle objects• You must try to solve the problem by yourself before you ask the

tutor for help.

– You must also have a sequence diagram to show that you have tried to understand the relationship of the classes

• The computer lab is CLCC 385 and the tutor’s name and hours are posted on the Blackboard announcement post for this class