CSC 213 – Large Scale Programming Lecture 3: Object-Oriented Analysis.

Slides:



Advertisements
Similar presentations
Interaction Diagram Notation From Chapter 15 of Craig Larman, Applying UML and Patterns John Dalesandro.
Advertisements

Edsger W. Dijkstra Simplicity is prerequisite for reliability.
Unit 251 Summary  Requirements may be represented in itemized format or in visual modeling (UML). Once the complete set of requirements are in our hand,
Systems Analysis and Design 8th Edition
Object Oriented Design An object combines data and operations on that data (object is an instance of class) data: class variables operations: methods Three.
Use-case Modeling.
Systems Analysis and Design in a Changing World, Fourth Edition
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Software Development Software Life Cycle UML Diagrams.
Use Case Modeling Written by: Zvika Gutterman Adam Carmi.
Lecture 1 CS171: Game Design Studio 1I UC Santa Cruz School of Engineering 5 January 2010.
Introduction to UML (slides adapted from Michael Mateas)
© 2007 Ray S. Babcock Tracks Game is played on a (nxn) set of squares. There are three possible moves (labeled A,B,C). Players alternate making a move.
1 CS1001 Lecture Overview Object Oriented Design Object Oriented Design.
UML class diagrams (1) UML = Unified Modeling Language We use only class diagrams, not other UML diagrams Purpose: –keep OO concepts separate from implementation.
CSC 395 – Software Engineering Lecture 15: Object-Oriented Design –or– Ask For Whom The Data Tolls.
Domain Modeling (with Objects). Motivation Programming classes teach – What an object is – How to create objects What is missing – Finding/determining.
Unified Modeling Language
CSC 213 – Large Scale Programming. Today’s Goal  Learn Unified Process to design programs  Understand what are the “types” of Java classes  Methods.
USE Case Model.
Objects What are Objects Observations
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
Lecture 2: UML Class DIAGRAM
System Sequence Diagrams
OBJECT-ORIENTED ANALYSIS PHASE
Slide 12.1 © The McGraw-Hill Companies, CS 4310: Software Engineering Lecture 7 Systems Analysis Object-Oriented Design.
SOFTWARE ENGINEERING BIT-8 APRIL, 16,2008 Introduction to UML.
CIT UPES | Sept 2013 | Unified Modeling Language - UML.
Session 12 Applying the Class Diagram to the Case Study Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 12, 2011 Presented by Hyewon.
CSC 213 – Large Scale Programming Lecture 2: Object-Oriented Analysis & Object-Oriented Design.
Java Classes Using Java Classes Introduction to UML.
Software Life Cycle Requirements and problem analysis. –What exactly is this system supposed to do? Design –How will the system solve the problem? Coding.
1 Analysis Extracting from Use Cases to Create Diagrams.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
Lecture 14 & 15: Object- Oriented Analysis Anita S. Malik Adapted from Schach (2004) Chapter 12.
CSC 213 – Large Scale Programming. Today’s Goal  Improve design skills to make usable designs  Noun extraction & UML class diagram reviewed  Connections.
LECTURE 14: USE CASE BASICS CSC 212 – Data Structures.
Systems Analysis & Design 7 th Edition Chapter 5.
Modeling system requirements. Purpose of Models Models help an analyst clarify and refine a design. Models help simplify the complexity of information.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
CSC 395 – Software Engineering Lecture 14: Object-Oriented Analysis –or– Ripping the Band-Aid Off Quickly.
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design, 2 nd Edition Copyright 2003 © John Wiley & Sons, Inc. All rights reserved.
Slide 12A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
 2000 Deitel & Associates, Inc. All rights reserved. Optional Case Study - Chapter 2 Outline 2.1 Introduction 2.2 Thinking About Objects: Identifying.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
THE ANALYSIS WORKFLOW  The specification document  Informal specifications  The analysis workflow  Extracting the entity classes  Functional modeling:
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Engineering Zhang Shuang
Systems Analysis and Design in a Changing World, Fourth Edition
+ TIC-TAC-TOE GAME CAPSTONE PROJECT SEN Team Members Sno.NameITU ID 1Keerthi Alimity Venkata Ganugapati Sujitha Sanku Bavi Bharathan87550.
M1G Introduction to Programming 2 3. Creating Classes: Room and Item.
UML Part 1: Class Diagrams. Introduction UML stands for Unified Modeling Language. It represents a unification of the concepts and notations presented.
CS223: Software Engineering
1 Prof. Dr. Nizamettin AYDIN
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Object Oriented Analysis & Design By Rashid Mahmood.
DATA FLOW DIAGRAMS.
 Problem Analysis  Coding  Debugging  Testing.
Software Modelling Class Diagram. Class Diagrams The main building block in object oriented modeling They are used both for general conceptual modeling.
OCR A Level F453: High level languages Programming techniques a. identify a variety of programming paradigms (low-level, object- oriented,
Business System Development
Lecture 9: Birds + BEES = CLASSES?
The Movement To Objects
Unified Modeling Language
UML The Unified Modelling Language. A way of drawing code overviews so that it's understood by any programmer. Usually part of a software development 'process'.
Object-Oriented Analysis
IMPORTANT NOTICE TO STUDENTS:
Chapter 5.
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Presentation transcript:

CSC 213 – Large Scale Programming Lecture 3: Object-Oriented Analysis

Today’s Goal Discuss how to refine proposed designs Illustrate a design using a language called UML Converting between UML and Java Test to see if the design works and makes sense Debugging methods when a design does not work

3 “Types” of Classes Unified Process concept to simplify designs Entity classes hold the long-lived data Boundary classes defined for input & output Control classes do complex processing in the program “Types” exist only for purposes of design Within Java, a class is a class is a class Noun extraction simplest way to find classes Select from nouns in requirements document

Buttons in elevators and on the floors control the movement of n elevators in a building with m floors. Buttons illuminate when pressed to request the elevator stop at a specific floor; the illumination is canceled when the request has been satisfied. When an elevator has no requests, it remains at its current floor with its doors closed. Designing Elevator Controller

Testing A Design How to know if design is logical & will work Illustrate using Unified Markup Language (UML) UML does not do any checking Provides “language” to investigate design and draw conclusions Once design is put into UML, can ask Does this make sense? Can I make it simpler? Is a class clearly responsible for each action?

UML Class Diagrams Each class is drawn as a 3-part box Class name written in top portion of box Fields written in middle portion of box (public) Methods written in bottom portion of box

Relationship Between Classes Also draw relationships between classes Relationships are lines connecting classes Mark at end of line denotes “type” of relationship Lines labeled with multiplicity -- number of objects involved in relationship Examples of relationships Aggregation & Composition Generalization (“inheritance”) Association

UML Class Diagram for Elevator Controller Button objects currently serves two purposes Buttons in elevator directing travel to a floor Buttons on a floor requesting travel Solution: Make 2 specializations of Button

UML Class Diagram for Elevator Controller Floor Buttons talk to all n Elevators? Need another class to handle this

UML Class Diagram for Elevator Controller All communication now 1-to-many Can also see where requests might fit

UML Class Diagram for Elevator Controller

Class Diagram Notes Advanced multiplicity relationships possible * used when relationship requires 0 or more + used when relationship requires 1 or more “1..4” when may have 1 to 4 instances of object Move functionality to superclass whenever possible No reason to code something more than once

Class Diagram Notes Iterative process that should not be rushed Remember, good designs yields easy coding Do not need worry about implementation yet Ignore details that do not involve multiple classes Should define all fields & public methods Must explain changes needed in implementation This will happen, so do not sweat it

Daily Activity Illustrate and refine design for tic-tac-toe controller: Game is played on a board. The board is a 3-by-3 grid of squares. Game has 2 players alternately making a move. For a move, a player selects a square. If the selected square is not empty, the player loses. Otherwise, the square is marked for the player. A player wins if they mark a line of 3 squares. If the entire board is marked without a player winning, the game is a tie.

For Next Lecture Will start discussing methods of testing code What preconditions and postconditions are How to thoroughly document methods Ways to use documentation to develop test cases Tools to automatically test your code