logistics
play

Logistics Syllabus / Student Info Forms Software Design and UML - PDF document

Logistics Syllabus / Student Info Forms Software Design and UML For those not here yesterday LDAP database Everyone check e-mail listing? Will send e-mail after this class. Plan for today Software Development Cycle


  1. Logistics • Syllabus / Student Info Forms Software Design and UML – For those not here yesterday • LDAP database – Everyone check e-mail listing? – Will send e-mail after this class. Plan for today Software Development Cycle • Process for software development • Building a software system – People management – Software Development Cycle – Work management – Documenting your design using UML – Team management • Caveat: These processes are merely guidelines – Your actual mileage may vary! Software Development Cycle Software Development Cycle • Gather Requirements • Problem Domain – Find out what the user needs – Gather Requirements / System Analysis • System Analysis • Solution domain – Express these needs formally in system terms • Design – Design / Implementation – Design a high level solution – Note: no code until implementation! • Implementation – Turn solution into code • Testing – Verify that the solution works • Maintenance – Iterate the cycle

  2. Software Development Cycle Software Development Cycle • Maintainance • Testing – Modifications – iterate over complete cycle – Unit testing – Integration testing • Note: This is just one methodology for – System testing software developments, there are others (e.g. eXtreme Programming). – Reviews • Requirements / Design / Code • Questions? Unified Modeling Language Unified Modeling Language • From the UML FAQ: • UML is a language for describing models. – “The Unified Modeling Language is a third- – Describes what a system is supposed to do but generation method for specifying, visualizing, not how it should be implement. and documenting the artifacts of an object- – Analysis and Design NOT Implementation. oriented system under development.” – Booch, Jacobson, Rumbaugh ( the Three – CASE tools can generate code from well Amigos) specified designs. • All three now work at Rational Software Unified Modeling Language Unified Modeling Language • UML defines numerous types of diagrams • Major Components – Entities • In this class we will focus on the following: • things in your model – Class diagrams – Relationships • Illustrates classes/objects and relationships • associations between things in the model – Use Case diagrams – Diagrams • Illustrates user interaction (scenerios) with system • Graphical representation of elements and relationships that – Sequence Diagrams present different views of the system. • Often presented as a graph (shapes connected by arrows). • Illustrates objects interaction over time in realizing a use case.

  3. Class Diagrams Class Diagrams – Classes • Classes and Objects Circle – All objects have the following: name • Name – how an object is identified constraint Radius:Integer { radius > 0 } • Attributes – defines an object’s state attributes Initial value • Operations – defines an object’s behavior Center: Point = (10,10) – Classes Display() : Boolean Return type operations • Categories of objects with the same set of attributes setPosition (pos:Point) and behavior parameters • Objects are instantiations of classes setRadius (r:Integer) Class Diagrams -- Relationships Class Diagrams -- Associations multiplicites • Associations name – Relationship between different objects of different classes 0..1 employs 0..* Company Person – Associations can have the following: Employer Employee • Name – identifies the association type • Multiplicity – indicates how many objects can participate in the association roles • Roles – Meaning of classes involved – Represented by lines connecting associated classes Class Diagrams -- Relationships Class Diagrams -- Aggregation • Aggregation 1 has 3..4 – Specifies a “whole”/”part” relationship” Car Wheels – has-a relationship Aggregation • Indicated by a line with an unfilled diamond at the end 1 has 1..* Invoice Invoice Item – Composition – strong aggregation where the Employee part generally does not exist without the whole. Composition • Indicated by a line with a filled diamond at the end

  4. Class Diagrams -- Relationships Class Diagrams -- Generalization • Generalization Shape – is-A relationship – Indicates inheritance • Indicated by a line with an open triangle. Circle Rectangle • Dependency – Relationship where a change in one element requires a change in the other • Instantiation Relationships Square • Temporary associations (operation arguments) • Creator / Createe relationship • Indicated by a dotted line Class Diagrams -- Dependency Class Diagram – Summary Instance of Car myCar GUI DisplayForm() Form Class Diagrams -- Summary Use Case Diagram • Classes / Objects – represented as boxes • Use case – Scenario about system use from a external user perspective . – Name / Attributes / Operations – Extremely useful tool for requirements gathering and • Relationships – lines connecting boxes analysis. – Associations – Use cases are indicated by an oval – Aggregations / Composition – Generalization – Actor – Entity located outside of a system that is – Dependency involved in the interaction with the system in a use case. • Questions? – Actors are indicated by a stick person.

  5. Use Case Diagram Use Case – Relationships • Use Cases can have relationships with other use cases – Include –use case that is performed during the course of another use case. – Extend – Adding extra steps to an already existing use case. Use Case – Relationships Programming by Contract • Introduced by Bertrand Meyer, the creator of Eiffel. • Creates a contract between the software developer and software user – Every feature, or method, starts with a precondition that must be satisfied by the consumer of the routine. – each feature ends with postconditions which the supplier guarantees to be true (if and only if the preconditions were met). – each class has an invariant which must be satisfied after any changes to the object represented by the class. Use Case -- Documentation Use Case – Register for courses • To be documented with a use case: • Precondition: – Sequence of steps that occur in the scenario – Student has been assigned a valid id/password – Preconditions • Postcondition: – Postconditions – Student becomes registered and can attend class. – Variations and alternative scenarios

  6. Use Case – Register for courses Use Case – Register for courses • Sequence of events • Alternative scenarios – Student logs into system – Student database unavailable – System extracts student data from DB – Courses cannot be retrieved – Based on this data, system presents a menu of – Course chosen by student is full. courses student can take – Communication to registrar is unavailable. – Student chooses course – Notification sent to registrar to add student to course. Use case diagram – Summary Summary • Use case – Scenario about system use from a external user • Software Design and Life Cycle perspective . – Requirements / Analysis / Design / – Ovals in diagram Implementation / Test / Maintenance • Actor – Entity located outside of a system that is involved in the interaction with the system in a use case. • UML – Stick person – Class Diagrams • Relationships – Use Case Diagrams – Extend / Include • Documentation – Sequence Diagrams (next time) • Questions?

Recommend


More recommend