Object Oriented Analysis and Object Oriented Programming Session 5 LBSC 790 / INFM 718B Building the Human-Computer Interface.

Slides:



Advertisements
Similar presentations
Problem Solving 5 Using Java API for Searching and Sorting Applications ICS-201 Introduction to Computing II Semester 071.
Advertisements

Lucene Part3‏. Lucene High Level Infrastructure When you look at building your search solution, you often find that the process is split into two main.
CS 106 Introduction to Computer Science I 02 / 18 / 2008 Instructor: Michael Eckmann.
Course Registration Registration Procedures. Log-in through Intranet Portal.
Designing Classes Chapter 3. 2 Chapter Contents Encapsulation Specifying Methods Java Interfaces Writing an Interface Implementing an Interface An Interface.
Lecture 27 Exam outline Boxing of primitive types in Java 1.5 Generic types in Java 1.5.
CS 206 Introduction to Computer Science II 01 / 21 / 2009 Instructor: Michael Eckmann.
Chapter 9 Characters and Strings. Topics Character primitives Character Wrapper class More String Methods String Comparison String Buffer String Tokenizer.
Identifying needs and establishing requirements Task Descriptions.
Structured Programming and UML Overview Session 2 LBSC 790 / INFM 718B Building the Human-Computer Interface.
CS 106 Introduction to Computer Science I 02 / 20 / 2008 Instructor: Michael Eckmann.
School of Computing Science CMT1000 Ed Currie © Middlesex University Lecture 4: 1 CMT1000: Introduction to Programming Ed Currie Lecture 5a: Input and.
SOS OOP Fall 2001 Object Oriented Programming in Java Week 1 Read a design Design a small program Extract a design Run a VAJ program Change that program,
Modular Programming and Use Case Models Session 3 LBSC 790 / INFM 718B Building the Human-Computer Interface.
Week 1 INFM 718N Web-Enabled Databases The Big Picture.
 2007 Pearson Education, Inc. All rights reserved C Arrays.
CS 206 Introduction to Computer Science II 01 / 23 / 2009 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 03 / 17 / 2008 Instructor: Michael Eckmann.
Data Structures Session 8 LBSC 790 / INFM 718B Building the Human-Computer Interface.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
Java Utility Classes CS 21b. Some Java Utility Classes Vector Hashtable StringTokenizer * import java.util.*;
1 v1.6 08/02/2006 Overview of Eclipse Lectures 1.Overview 2.Installing and Running 3.Building and Running Java Classes 4.Refactoring 5.Debugging 6.Testing.
 PROBLEM: We want to write a program that gets a sentence and displays the first three words in the sentence on separate lines, followed by the rest of.
Recitation 2 Main Method, API & Packages, Java Basics.
Introduction. 2COMPSCI Computer Science Fundamentals.
Getting Started with Java Recitation – 1/23/2009 CS 180 Department of Computer Science, Purdue University.
Object-oriented Programming and Collaboration and Sequence Diagrams Session 5 LBSC 790 / INFM 718B Building the Human-Computer Interface.
Methods Divide and conquer Programmer-declared methods Prepackaged methods – Java API Software reusability Debug-ability and maintainability AKA functions.
1 計算機程式設計 Introduction to Computer Programming Lecture01: Introduction and Hello World 9/10/2012 Slides modified from Yin Lou, Cornell CS2022: Introduction.
Spring 2008 Mark Fontenot CSE 1341 Principles of Computer Science I Note Set 2.
COMP Recursion, Searching, and Selection Yi Hong June 12, 2015.
JAVA: An Introduction to Problem Solving & Programming, 5 th Ed. By Walter Savitch and Frank Carrano. ISBN © 2009 Pearson Education, Inc., Upper.
BUILDING JAVA PROGRAMS CHAPTER 7 Arrays. Exam #2: Chapters 1-6 Thursday Dec. 4th.
Arrays An array is a data structure that consists of an ordered collection of similar items (where “similar items” means items of the same type.) An array.
Utilities (Part 2) Implementing static features 1.
Algorithms Session 7 LBSC 790 / INFM 718B Building the Human-Computer Interface.
Evolutionary Art with Multiple Expression Programming By Quentin Freeman.
By Tracking Shipment. Agenda Porject Task Process Model Design Programming Model Design Deployment Model Design Test.
Day Class Definitions and Methods Local & global variables, parameters & arguments,
Today’s Agenda  Reminder: HW #1 Due next class  Quick Review  Input Space Partitioning Software Testing and Maintenance 1.
Collaboration and Sequence Diagrams and Graphical User Interfaces
Advanced Computer Science Lesson 4: Reviewing Loops and Arrays Reading User Input.
Hashing as a Dictionary Implementation Chapter 19.
UML Use Case Models and Modular Programming Session 3 LBSC 790 / INFM 718B Building the Human-Computer Interface.
AP Computer Science edition Review 1 ArrayListsWhile loopsString MethodsMethodsErrors
Hashing Fundamental Data Structures and Algorithms Margaret Reid-Miller 18 January 2005.
 2007 Pearson Education, Inc. All rights reserved C Arrays.
Algorithms and Graphical User Interfaces (part 2) Session 8 LBSC 790 / INFM 718B Building the Human-Computer Interface.
Object-Oriented Analysis and Design Use cases Finding classes Collaboration and Sequence diagrams Associations between classes.
Computer Science II 810:062 Section 01 Session 2 - Objects and Responsibilities.
Arrays. Topics to be Covered... Arrays ◦ Declaration ◦ Assigning values ◦ Array manipulation using loops Multi-dimensional arrays ◦ 2D arrays ◦ Declaration.
Arrays Chapter 7. MIS Object Oriented Systems Arrays UTD, SOM 2 Objectives Nature and purpose of an array Using arrays in Java programs Methods.
Modular Programming and UML Class and Object Diagrams Session 4 LBSC 790 / INFM 718B Building the Human-Computer Interface.
Sub-Phase Low Level Design (cont)
Chapter 3: Sorting and Searching Algorithms 3.1 Searching Algorithms.
Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 1 Chapter 15 Abstract Classes and Interfaces.
1 CS February 2009 Inside-out rule; use of this and super Developing methods (using String ops). Read sec. 2.5 on stepwise refinement Listen to.
CSC 243 – Java Programming, Spring, 2014 Week 4, Interfaces, Derived Classes, and Abstract Classes.
IST 210: PHP Basics IST 210: Organization of Data IST2101.
Methods. Creating your own methods Java allows you to create custom methods inside its main body. public class Test { // insert your own methods right.
Coming up Implementation vs. Interface The Truth about variables Comparing strings HashMaps.
Structured Programming and UML Introduction Session 2 LBSC 790 / INFM 718B Building the Human-Computer Interface.
CSC 243 – Java Programming, Fall, 2008 Tuesday, September 30, end of week 5, Interfaces, Derived Classes, and Abstract Classes.
Object-Oriented Concepts
Software Development Java Classes and Methods
Fundamentals of Java: AP Computer Science Essentials, 4th Edition
Announcements 2nd homework is due this week Wednesday (October 18)
March 29th Odds & Ends CS 239.
CSE 1020:Programming by Delegation
Collections Not in our text.
Presentation transcript:

Object Oriented Analysis and Object Oriented Programming Session 5 LBSC 790 / INFM 718B Building the Human-Computer Interface

Agenda Collaboration and sequence diagrams Getting from diagrams to Java code Making sense of the API What’s in a GUI?

Flight Finder Exercise

FlightFinder Use Case Diagram JOSAC Traveler Select Search Parse Sched >

Search Use Case Narrative Assumptions –Current JOSAC schedule parsed Pre-conditions –None Initiation –Search function selected Dialog –Search parameters selected, search initiated, unknown locations resolved, route list displayed Termination –Route search complete (normal), unknown location (error) Post-conditions –Route list displayed (if available) or blank

Select Use Case Narrative Assumptions –Route list displayed Pre-conditions –At least one available route Initiation –Route selected from list Dialog –Select route, display details in map+timeline+text Termination –Display completed Post-conditions –Details displayed

Flies betweenContains Simple Class Diagram Route GUI Map Timeline Location Airfield Leg AircraftType Schedule Flight * 1 1 * ** * * Sequence of Displayed in 2 1 Travel between Uses

Flies between * Full Class Diagram Route GUI Map Timeline Location Airfield Leg AircraftType Schedule Flight 1 * ** Sequence of 2 1 Travel between +addLeg(l:Leg) +summary():String +search(p:Param) +display(r:Route) +draw(r:Route) -seats: integer -departureTime: Time -arrivalTime:Time +parse(s:String) +summary():String -name:String -icaoIdentifier:String{4} -latitude:double -longitude:double -timeZone:TimeZone +distanceTo(l:Location) -flightNumber:String +parse(s:String) -updated:Time -source:URL +parse(f:File) -name:String -speed:int +flightTime(o:Location, d:Location) Contains Uses Displayed in 1 1 Displayed in 1 * 2 *

D Object Diagram 1:Route :GUI :Map :Timeline DC:Location Andrews:Airfield :Leg C-9B:AircraftType Sep26:Schedule AF302:Flight -seats=3 -departureTime=1200Z -arrivalTime:1400Z -name=Andrews AFB -icaoIdentifier=KADW -latitude:38-48N -longitude:076-51W -timeZone=EASTERN -flightNumber:AF302 -updated:Sep 26/1200Z -source: -name=C-9B -speed=450 knots LA:Location -latitude=33-57N -longitude=118-24W -timeZone=PACIFIC Scott:Airfield -name=Scott AFB -icaoIdentifier=KBLV Lambert:Airfield :Leg -seats=34 -departureTime=1600Z -arrivalTime=1900Z -name=Lambert Field -icaoIdentifier=KSTL LAX:Airfield -name=LA Intl Airport -icaoIdentifier=KBLV NV514:Flight -flightNumber:NV514 O D O O D 1st 2nd Key: O = Origin D = Destination

Collaboration Diagram 1:Route :GUI :Map :Timeline DC:Location Andrews:Airfield second:Leg C-9B:AircraftType Sep26:Schedule AF302:Flight LA:Location Scott:Airfield Lambert:Airfield first:Leg LAX:Airfield NV514:Flight 1:getText() 7:getText() 2:getText() 5:getText()6:getText() 3:getText() 4:getText() 10:getText()11:getText() 8:getText() 9:getText() 13:getLatLong() 12:getLatLong() 15:plot(r:Route) 14:plot(r:Route) Scenario: First route selected

Sequence Diagram :GUIall:Airfieldsnear:Airfieldsandrews:Airfieldfirst:Leg findNear(dept):Airfields return near nextAirfield():Airfield return andrews nextLeg():Leg return first getDestination():Airfield return scott return near findNear(scott):Airfields Continue depth-first search, pruning unsuccessful routes after 9 legs

Practice Exercise Create a Class Diagram for an academic transcript –Include a method to add courses –Include a method to compute grade point average –Include a method to print the transcript Code (only) the transcript class in java –Include a main method that tests the class –Create stubs for any other needed classes Run your main method

Working with the Java API Instantiate an object: –String s = new String(“test”); –int i = s.indexOf(“s”); Directly use a static method: –int z = Math.min(x,42); Use a static method to get an object: –NumberFormatter f = NumberFormat.getCurrencyInstance(); –String d = f.format(327);

Classes to Explore in the API String –Manipulate strings (e.g., to extract substrings) StringTokenizer –Pick apart strings (e.g., into words) GregorianCalendar –Dates and times Hashtable –Like arrays, but with any object as the index

Muddiest Point On a blank sheet of paper, write a single sentence that will convey to me what you found to be the most confusing thing that was discussed during today’s class.