School of Information Sciences and Technology IST 311

  • Slides: 24
Download presentation
School of Information Sciences and Technology IST 311 – Object-Oriented Design & Software Steven

School of Information Sciences and Technology IST 311 – Object-Oriented Design & Software Steven Haynes IST 311 – Class 7 17 January 2006 shaynes@ist. psu. edu

School of Information Sciences and Technology Mid-Term Deliverables Use Case diagrams – Derived from

School of Information Sciences and Technology Mid-Term Deliverables Use Case diagrams – Derived from scenarios • Class diagram – Conceptual • Sequence diagrams TBD – Need use cases first • User Interface Design – Need use cases first • Due Thursday, March 3 rd (Thursday before break) ist. psu. edu

School of Information Sciences and Technology Design Representations • Why learn the UML? •

School of Information Sciences and Technology Design Representations • Why learn the UML? • What is the purpose of design representation languages and techniques? ist. psu. edu

School of Information Sciences and Technology Design Representations • An aid to design cognition

School of Information Sciences and Technology Design Representations • An aid to design cognition • A common language for communicating about a design (specifications) • A record of the design process and its outcomes (documentation) ist. psu. edu

School of Information Sciences and Technology UML Diagrams, Part 1. • Use Case diagram

School of Information Sciences and Technology UML Diagrams, Part 1. • Use Case diagram ist. psu. edu

School of Information Sciences and Technology UML Diagrams • Use Case diagram – Identify

School of Information Sciences and Technology UML Diagrams • Use Case diagram – Identify major services provided by a system to external actors (users and other systems) • Establish the boundaries of the system • Identify common functionality • Identify high-level alternate use scenarios – Capture requirements – Development project planning tasks – Communicate with the customer/user. ist. psu. edu

School of Information Sciences and Technology Use Case Diagram ist. psu. edu

School of Information Sciences and Technology Use Case Diagram ist. psu. edu

School of Information Sciences and Technology Use Cases • • • Actors Use Cases

School of Information Sciences and Technology Use Cases • • • Actors Use Cases Include (Uses) Use Cases Extend Use Cases Annotations – Pre-conditions – Post-conditions – Constraints • Don’t use actor or use case generalization ist. psu. edu

School of Information Sciences and Technology Guidelines for Use Cases • Actors – specific

School of Information Sciences and Technology Guidelines for Use Cases • Actors – specific user roles • Human actors on left • Non-human actors (systems) on right • Use Cases – verb-noun phrase • e. g. , Verify Credit Card • Include (uses) link – included use case MUST be completed for the including use case to complete • Extend link – extending use case represents a variant of the extended use case ist. psu. edu

School of Information Sciences and Technology Guidelines for Use Cases • Use cases model

School of Information Sciences and Technology Guidelines for Use Cases • Use cases model system interactions. • Use case granularity THE big problem • Use annotations (notes) freely to document your assumptions. • Use cases are not data stores • Use cases are not data flow diagrams ist. psu. edu

School of Information Sciences and Technology UML Diagrams • Class diagram ist. psu. edu

School of Information Sciences and Technology UML Diagrams • Class diagram ist. psu. edu

School of Information Sciences and Technology UML Diagrams • Class diagram – Identify classes

School of Information Sciences and Technology UML Diagrams • Class diagram – Identify classes • Attributes • Operations – Identify class relationships – Identify packages – Describe a system’s static structure ist. psu. edu

School of Information Sciences and Technology Class Diagram ist. psu. edu

School of Information Sciences and Technology Class Diagram ist. psu. edu

School of Information Sciences and Technology UML Diagrams • Sequence diagram ist. psu. edu

School of Information Sciences and Technology UML Diagrams • Sequence diagram ist. psu. edu

School of Information Sciences and Technology UML Diagrams • Sequence diagram – Describe the

School of Information Sciences and Technology UML Diagrams • Sequence diagram – Describe the sequence of steps required to realize a use case or use case scenario, which represent requirements – Describe interactions between objects/classes – Perspective is time oriented ist. psu. edu

School of Information Sciences and Technology Sequence Diagram ist. psu. edu

School of Information Sciences and Technology Sequence Diagram ist. psu. edu

School of Information Sciences and Technology UML Diagrams • Collaboration diagram ist. psu. edu

School of Information Sciences and Technology UML Diagrams • Collaboration diagram ist. psu. edu

School of Information Sciences and Technology UML Diagrams • Collaboration diagram – Same as

School of Information Sciences and Technology UML Diagrams • Collaboration diagram – Same as Sequence diagram except… – Perspective is structural or spatial ist. psu. edu

School of Information Sciences and Technology Collaboration Diagram ist. psu. edu

School of Information Sciences and Technology Collaboration Diagram ist. psu. edu

School of Information Sciences and Technology Degree Audit Use Cases & Classes ist. psu.

School of Information Sciences and Technology Degree Audit Use Cases & Classes ist. psu. edu

School of Information Sciences and Technology Eclipse Tutorial ist. psu. edu

School of Information Sciences and Technology Eclipse Tutorial ist. psu. edu

School of Information Sciences and Technology Assignment for Thursday • This is an individual

School of Information Sciences and Technology Assignment for Thursday • This is an individual assignment. • If you have not had Java it will take some time so don’t wait too late to start working. • Read Raposa Chapters 1 through 3. • Do problems on the next two slides. • For this assignment you can use the Java SDK for the labs, as described in the book, or Eclipse. • Due at the start of class Thursday, 1/19. ist. psu. edu

School of Information Sciences and Technology Assignment Lab 1 • Write a public class

School of Information Sciences and Technology Assignment Lab 1 • Write a public class called Credit. Calculator and declare the main() method within the class. • The value for current. Credits will be input from the command line. Command-line arguments are strings so you’ll need to convert the value of current. Credits to an integer within main(): int current. Credits = Integer. parse. Integer(args[0]); * Hint Run menu: Run, then the Arguments tab • Write a method to calculate credits. Needed given the value of current. Credits. Display the result. • Save, compile, and run your program. You’ll need to enter the command-line argument java Credit. Calculator 62 ist. psu. edu

School of Information Sciences and Technology Assignment Lab 2 • Extend the main() method

School of Information Sciences and Technology Assignment Lab 2 • Extend the main() method in your Credit. Calculator class to calculate the number of semesters remaining given 15 credits per semester. • Also, if the number of current. Credits is >= 120, output the string “You can graduate!” ist. psu. edu