1 / 22

Construction

Construction. Lecture Oo20 Gymnastics System Example Cont’d. References. The Booch Method Guide, for Rose 2.0 Fowler & Scott, UML Distilled Applying the Standard Object Modeling Language, AWL, 1997, Chapt 2. Teaching Points. Design activities Implementation classes. Review.

dmccorkle
Download Presentation

Construction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Construction Lecture Oo20 Gymnastics System Example Cont’d

  2. References • The Booch Method Guide, for Rose 2.0 • Fowler & Scott, UML Distilled Applying the Standard Object Modeling Language, AWL, 1997, Chapt 2

  3. Teaching Points • Design activities • Implementation classes

  4. Review • How would you protect your architecture from a change in DBMS? • What is an executable release plan?

  5. Design Activities • Reapplication of the micro process but at a greater level of detail • Less Abstract • Specification and Implementation perspectives used

  6. Identify Key Abstraction • Now we identify abstractions in the solution domain • Classes needed to describe How we will solve the problem • Introduce controller classes

  7. Relationships Navigation paths specified where needed for association relationships Some associations converted to aggregation or dependency Container classes introduced for 1 to many relationships

  8. Attributes Specify field or reference Access control specified

  9. Operations Algorithms described in more detail Access control

  10. Executable release: Scoring Report Goal: Verification and successful use of navigational paths and score derivation logic for the scores of a competition. Start Date: 26 Aug 98 Effort: 12 developer-weeks Classes to be implemented: Competition, Event, Trial, RawScore, Team Use Cases to be Implemented: Scoring Inputs: Dummy database (validated in advance) with a meet, a competition, all events for that competition, all competing teams and gymnasts for the competition, and all trials and raw scores. Outputs: The data needed to build the report on Figure 4-3, “Output of the Gymnastics System,” on page 25 of requirement spec. A DB utility dump of the raw input for comparison.

  11. Meet: Town InvitationalCompetition: Women’s Senior TeamDate: 12/3/92

  12. Scoring Algorithm English: Each judge rates each gymnast on the event and reports the score to a scorekeeper. The scorekeeper throws out the high and low scores and averages the rest. This is the gymnast’s score for the event.

  13. Scoring Algorithm Score score(){ Score net_score = scores.first(); //Iterate over the scores and sum while(!scores.done()) { net_score = net_score + scores.next(); scores.next(); } //Throw out the low and high net_score=net_score-(scores.min()+scores.max()); //average by scores used net_score=net_score/(scores.length()-2); return net_score; }

  14. Introducing Container Classes

  15. Update Specifications

  16. Class name: Trial Category: Contests Documentation: A trial is a single performance of a gymnast at a given event. The gymnast may attempt multiple trials at the same event (i.e. on the same piece of equipment). Each trial is scored separately by the judging panel. Each judge's score is associated with the trial by using the method addScore(). The gymnast's resulting score for the trial is obtained by calling the method score(). External Documents: Export Control: Public Cardinality: n Hierarchy: Superclasses: none Associations: competetor : Gymnast in association <unnamed> scores : TrialScoreList in association <unnamed> <no rolename> : Event in association <unnamed> Public Interface: Operations: addScore score State machine: No Concurrency: Sequential Persistence: Persistent

  17. Operation name: addScore Public member of: Trial Arguments: Score newScore EventJudge scoringJudge Documentation: Adds a score and judge pair (RawScore) to the trial's set of scores. The set of scores represents the raw set scores provided by the judging panel. Normally each member of the judging panel will provide one score. Concurrency: Sequential

  18. Operation name: score Public member of: Trial Return Class: Score Documentation: Computes a trial's overall score based on dropping the highest and lowest scores and averaging the rest. { Score net_score = scores.first(); //Iterate over the scores and sum while(!scores.done()) { net_score = net_score + scores.next(); scores.next(); } //Throw out the low and high net_score=net_score-scores.min()+scores.max()); //average by scores used net_score=net_score/(scores.length()-2); return net_score; } Concurrency: Sequential

  19. Teaching Points • Design activities • Implementation classes

More Related