Presentation is loading. Please wait.

Presentation is loading. Please wait.

Construction Lecture Oo20 Gymnastics System Example Cont’d.

Similar presentations


Presentation on theme: "Construction Lecture Oo20 Gymnastics System Example Cont’d."— Presentation transcript:

1 Construction Lecture Oo20 Gymnastics System Example Cont’d

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

3 Teaching Points n Design activities n Implementation classes

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

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

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

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

8 Attributes n Specify field or reference n Access control specified

9 Operations n Algorithms described in more detail n 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 Invitational Competition: Women’s Senior Team Date: 12/3/92

12

13

14 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.

15 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; }

16 Introducing Container Classes

17

18 Update Specifications

19 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 scores : TrialScoreList in association : Event in association Public Interface: Operations: addScore score State machine:No Concurrency:Sequential Persistence:Persistent

20 Operation name: addScore Public member of:Trial Arguments: ScorenewScore EventJudgescoringJudge 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

21 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

22 Teaching Points n Design activities n Implementation classes


Download ppt "Construction Lecture Oo20 Gymnastics System Example Cont’d."

Similar presentations


Ads by Google