Saturday, March 29, 2008

Sequence Diagram for Use Case 1


Here is the Sequence Diagram for Use Case 1. There is not much to it. It would have just as well been served with a collaboration diagram. But, it appears that Community Edition of Magicdraw does not have such a diagram. So this will have to do, unless I want to spend the money to see if the Standard Edition comes with the collaboration diagram.

In reality, this did not need to be published, since it does not show more than the System Sequence Diagram.

Newly updated Static Class Diagram


This is the NEWLY updated Static Class Diagram (at least the first in a series of two). The second Static Class Diagram is just fine, so it will be left alone for future reference. But, since I removed the Runner class and all its associations, I needed to update this Static Class Diagram.

New Design Class Diagram


This is the NEW Design Class Diagram for the Pace Calculator Application.

Changes to the Design Diagrams

After looking at the first interaction diagram, I don't think I need the Runner class! Yes, the original intent of the person class was to identify real world objects, but I think I went overboard with that, since the Runner is the actor!!! That was my mistake. I am going to go ahead and take it out of the Design Class Diagrams and start the interaction diagrams from there. I will update these diagrams, as well as what is on the web.

Thus, I have taken out the Runner and Person classes and updated the design to reflect those changes. I am going to publish the newly updated diagrams when I am done with this blog entry.

Friday, March 28, 2008

Another Static Class Diagram


I have uploaded both Static Class Diagram images. To me, this is a vital first step in the design, since it shows thought on responsibility assignment.

Set up the static diagrams

What is the rational behind the Time Class?

The Time Class needs to allow the input of time in the following formats: HH:MM:SS.ss, MM:SS.ss, HH.hh or MM.mm. Thus, I think it would be best to include methods that can handle such formats. I also think the Class would need to know as much about the time format as possible. This means keeping a decimal format data type stored to indicate how the data was entered: either in HH.hh or MM.mm format. This should also determine how to display the time data in a particular decimal format. Thus, I also think that it would be a good idea to also store a decimal boolean. This would indicate whether or not data should be displayed in as a decimal or in the traditional form.

I think I also should include arithmetic methodologies with the class: the ability to add and subtract different time objects and return a value from that arithmetic operation. I believe these will help to define the type of class the Time class intent.

Design Class Diagram


Here are the classes that I have so far discerned. This is the design class diagram:


Now it's time to write up the methods and attributes related to these classes.



What to do with the Person Class?

What do I want to do with the Person class? That's a good question. Do I want to make it an interface, or do I want to keep an abstract class or, do I just want to keep a regular class? What benefit will it have in the long run? That's another good question. Since everybody emulated in software is-a person, I think it would be best to think of it as an abstract class (at most), a regular class on average. I don't think there is any benefit to making the class an interface. What will a runner bring that a person will not to the design?

Wednesday, March 26, 2008

Analysis Done, now Design?

What is the next step?

What is the next step of this project development? I think the analysis is complete. It is now onto the design. This means that I need to figure out the of the Software Entities. This is the transition from Analysis to Design. This means that I need to transition from the Domain Class Diagrams to Design Class Diagrams. I have gone through the checklist of Analysis Models, and I have done all the modeling: the analysis is very complete. In fact, it is a little too complete. This is almost a waterfall development cycle, not an iterative development cycle. I don't consider that a problem, sys this project is so small, it would take just a day to complete: in fact, this project really does not need any development documentation. But, since this is a "pet project", it really is just (literally) an academic exercise. Regardless, I will continue.

Onward to design

I intend to use the stereotypes appropriately. From reading the everything that I have, I don't think that should be a problem.

Tuesday, March 25, 2008

Domain Model Class Diagram














Domain Model Class Diagram

Possible Classes (Real World Objects)

Now from the nouns, try to determine the the classes (Real World Objects), not software entities. From looking at the nouns, I have determined the (possible) objects related to the system. These objects will make up the Class Diagram, which will eventually be used in the design phase of the application development.

From the noun analysis of the Use Case Documentation, I have determined the classes (Real World Objects) to be:
  • Pace Calculator
  • Runner
  • Run Data
  • Run Data File (To be saved to a disk)

For notation purposes only, noted attributes are included in the following classes:
  • Run Data
    • Time
    • Pace
    • Distance
    • Runner's Name

  • Run Data File
    • Run Data
    • File Location
    • Name

Getting the Nouns from the Use Cases (Detailed Description)

From looking at the Use Case Documentation, first look at the nouns. In other words, what are the nouns in the Use Cases? Look at all the Nouns in the Use Cases.
Nouns
  1. Runner
  2. System
  3. Pace
  4. Data
  5. Time
  6. Distance
  7. Run
  8. Application
  9. User (Runner)
  10. Computer
  11. Calculation
  12. File
  13. Format
  14. Name
  15. Location (File)

Monday, March 24, 2008

Now need to figure what's the next step

What will be the next step? This is always the sticky part in OOAD (at least for me). What do I next? What is the next step? Do I take the use cases and try to figure out what the classes (real world objects are?) This is done most easily by determining the nouns from the Use Cases-the Detailed Descriptions. I guess the next step would be to print out the Use Cases and identify the nouns.

This is what I am currently doing now, from there, I will figure out what the are the objects (real world objects, not software entities).

Sunday, March 23, 2008

System Sequence Diagram for Use Case 5















System Sequence Diagram for Use Case 5

Using a new UML Diagramming tool

You will notice that I changed diagramming looks. That is because I changed different UML diagramming programs. The new version is MagicDraw community edition. Unfortunately, it is not as "open" as StarUML, but it offers a little more in terms of Sequence Diagram notation (like being able to indicate a return message). It makes diagramming more like what I learned in the UML notation. In other words, MagicDraw is more robust in their diagramming features than StarUML. The current MagicDraw application that I am using is the Community Edition. This is more of an "investigation version", meant to whet your appetite (my opinion) to the application so that you would buy it. The single version is $149.00 a copy. It is duly noted the Community Edition of MagicDraw is not meant for Commercial Use. Since this application is not for profit, rather freeware for anyone to use and download (I will eventually register this with the GPL) I don't think there are any legal issues with using this version of MagicDraw. The only thing I am concerned about is releasing the design diagrams to my blog-over the web. Will I ever buy MagicDraw, that is a good question. The MagicDraw website does not seem too user friendly in terms of trying to buy a Single Version. If I like it, I will eventually buy a version. But, that is a not the current priority, just getting the diagrams out is the current priority.

Saturday, March 22, 2008

System Sequence Diagram form Use Case 4


Use Case 4 System Sequence Diagram

Use Case 3 System Activity Diagram


For Use Case 3, I decided to try making an Activity Diagram as opposed to a System Sequence Diagram. From What I have read, and come to understand, this diagram is another means to display the interaction between the Actor and the System at the System level.

Use Case 2 System Sequnce Diagram














Use Case 2 System Sequence Diagram

Friday, March 21, 2008

Use Case 1 System Sequence Diagram



Use Case 1 System Sequence Diagram

The Use Case Diagram














This the the Use Case Diagram for the Pace Calculator Application.

Thursday, March 20, 2008

Need to move onto the System Sequence diagrams

With the Use Case Detailed descriptions completed, published and posted, it is now time to move onto the System Sequence Diagrams. This will be done for each Use Case (this may be redundant, since three of the Use Cases are similar, but it needs to be done). The move onto the Class diagram (Analysis Phase). Then figure out what to do from here (possibly the System Activity Diagrams).

Save Run Data Use Case Detailed Description

Use Case NameSave Run Data
ScenarioN/A
Triggering EventRunner requests run data is saved.
Brief DescriptionThe runner elects to save the calculated and/or input data. The system saves the data in the requested file..
ActorsRunner
Related Use CasesEnter Run Data
StakeholdersN/A
PreconditionsThe Application is running, data must be entered. Pace must be entered in MM:SS.ss or MM.mm format. Time of run must be entered in HH:MM:SS.ss or HH.hh format. Distance must be entered in Meters, kilometers or Miles.
PostconditionsData must be saved in the appropriate file, in the appropriate file format (i.e. a database or spreadsheet).
Flow of EventsActorSystem

1. Runner enters the appropriate data for saving.

2. Runner requests the system to save the data.2. Requests the file name and location for saving the data (or shows the location of the current file where last saved data resides).

3. Enters the file name and location.3. Saves the data.

3.1 Informs the user the data was saved.
Exception Conditions1. If the runner does not enter any data for saving, then the System informs the user that data is needed for saving: either a) The Time of Run, b) The Runner's Pace or c) The Run Distance.

2. If the runner enters the time in the wrong format or mis-enters the time, then the System informs the user of the proper format for time entry.

2. If the runner enters the pace in the wrong format or mis-enters the pace, then the System informs the user of the proper format for pace entry.

2. If the runner enters the distance in the wrong format, then the System informs the user of the proper format for distance entry.

3. If the System cannot save the data, then the System informs the user the data could not be saved.

Calculate Distance Ran Use Case Detailed Description

Use Case NameCalculate Distance Ran
ScenarioN/A
Triggering EventRunner requests the run distance calculation.
Brief DescriptionThe: 1) Pace in MM:SS.ss or MM.mm format 2) Time of run in HH:MM:SS.ss or HH.hh format is entered into the System.The System takes the Time, divides it by the pace and returns the distance ran.
ActorsRunner
Related Use CasesEnter Run Data
StakeholdersN/A
PreconditionsThe Application is running, pace must be entered in MM:SS.ss or MM.mm format. Time of run must be entered in HH:MM:SS.ss or HH.hh format.
PostconditionsRun Distance data must be calculated. Distance is presented in Meters, kilometers or Miles format.
Flow of EventsActorSystem

1. Runner enters the Run Time and the Pace.

2. Runner requests the Run Distance2. Calculates the Run Distance by taking the Run Time and dividing it by the Run Pace.


2.1 Presents the calculated Run Distance in Meters, kilometers or Miles format.
Exception Conditions2. If the runner does not enter enough data for the calculation, then the System informs the user more data is needed: either a) The Time of Run or b) The Runner's Pace.

2. If the runner enters the time in the wrong format or mis-enters the time, then the System informs the user of the proper format for time entry.

2. If the runner enters the pace in the wrong format or mis-enters the pace, the the System informs the user of the proper format for pace entry.

Calculate Run Time Use Case Detailed Description

Use Case NameCalculate Run Time
ScenarioN/A
Triggering EventRunner enters the appropriate data for run time calculation.
Brief DescriptionThe: 1) Distance Ran 2) Pace in MM:SS.ss or MM.mm format is entered into the computer.The System takes the Pace, multiplies it by the distance and returns the run time of the runner in HH:MM:SS.ss or HH.hh format.
ActorsRunner
Related Use CasesEnter Run Data
StakeholdersN/A
PreconditionsThe Application is running, pace must be entered in MM:SS.ss or MM.mm format. Run Distance must be entered in Meters, kilometers or miles format.
PostconditionsThe Run Time data must be calculated. Run Time is presented in MM:SS.ss or MM.mm format.
Flow of EventsActorSystem

1. Runner enters the Run Distance and the Pace.

2. Runner requests the Run Time2. Calculates the Run Time by taking the Run Distance and multiplying it by the Run Pace.


2.1 Presents the calculated Run Time in HH:MM:SS.ss or HH.hh format.
Exception Conditions2. If the runner does not enter enough data for the calculation, then the System informs the user more data is needed: either a) The Distance Ran or b) The Runner's Pace.

2. If the runner enters the time in the wrong format, then the System informs the user of the proper format for time entry.

2. If the runner enters the distance in the wrong format, then the System informs the user of the proper distance format (this should be pretty explanatory).

Tuesday, March 18, 2008

Calculate Pace Use Case Detailed Description

Use Case NameCalculate Pace
ScenarioN/A
Triggering EventRunner enters the appropriate data for pace calculation.
Brief DescriptionThe: 1) Distance Ran 2) Time of run HH:MM:SS.ss format or HH.hh format are entered into the System. The System takes the time, divides by the distance and returns the pace of the runner in MM:SS.ss format or MM.mm format.
ActorsRunner
Related Use CasesEnter Run Data
StakeholdersN/A
PreconditionsThe Application is running, time of run must be entered in HH:MM:SS.ss or HH.hh format
PostconditionsThe Pace data must be calculated. Pace is presented in MM:SS.ss or MM.mm format.
Flow of EventsActorSystem

1. Runner enters the a) Distance Run b) Time of Run

2. Runner requests the pace to be calculated2. Calculates the pace by taking the time and divding it by the distance.


2.1 Presents the calculated Pace
Exception Conditions2. If the runner enters only one of the two needed data points, the System informs the user more data is needed: either the a) Run Distance or b) The Time of Run.

2. If the runner enters the time in the wrong format, then the System informs the user of the proper format for time entry.

Monday, March 17, 2008

Enter Run Data Use Case Detailed Discription

Use Case Name: Enter run data

Scenario: N/A

Brief Description: When the application is running, the runner inputs the following data:
1) Distance Ran
2) Time of run
3) Pace

Actors: Runner

Related Use Cases: N/A

Stakeholders: N/A

Preconditions: The application is running

Postconditions: Part of the data used for the appropriate calculation is entered. This means that two of the three data inputs are entered. Either:
a) Distance Ran and TIme of Run
b) Distance Ran and Pace
c) TIme of Run and Pace

Or the data entered for the purpose of archiving selected run data.


Flow of Events: Actor System
1. Runner enteres the
appropriate data for the
required calculation or
archiving.
2. Runner then enters the 2. System calculates the requested
appropriate action, data and presents it to the Runner.
either calculating the: Or, System archives the data and
a) Run Distance informs the Runner the data was
b) Pace archived.
c) Run Time or
archiving data of a previous
run.

Exception
Conditions: 2. If the runner does not entered enough data for calculation, then the System informs the Runner more data is needed for calculation.
2. If the System cannot archive the data, it informs the Runner of the situation, presenting a possible reason why data archiving is not possible.

Sunday, March 16, 2008

Use Cases in Brief

Enter Run Data
When the application is running, the runner inputs the following data:
1) Distance Ran
2) Time of run
3) Pace

Calculate Pace
With the application running, the runner inputs:
1) Distance Ran
2) Time of run HH:MM:SS.ss format or HH.hh format
The System takes the time, divides by the distance and returns the pace of the runner in MM:SS.ss format or MM.mm format.

Calculate Run Time
With the application running, the runner inputs:
1) Distance Ran
2) Pace in MM:SS.ss or MM.mm format
The System takes the Pace, multiplies it by the distance and returns the run time of the runner in HH:MM:SS.ss or HH.hh format.

Calculate Distance Ran
With the application running, the runner inputs the following data:
1) Pace in MM:SS.ss or MM.mm format
2) Time of run in HH:MM:SS.ss or HH.hh format.
The System takes the Time, divides it by the pace and returns the distance ran.

Save Run Data
With the application running, the runner elects to save the calculated and/or input data. The system saves the data in the requested file.

The original Pace Calculator idea

The idea behind the Pace Calculator is to allow the "Tech Savvy" runner the ability to record their pace, time and distance for a given run. This is not what gives the Pace Calculator its ability, this is just one of the main options. Rather, there are three main functionalities to the Pace Calculator, all wrapped up into the main ability of the Pace Calculator. The main ability of the Pace Calculator is to calculate:
1) A runner's pace given their distance and time
2) A runner's distance given their time and pace (pretty mundane)
3) A runner's time given their pace and distance (this is an excellent tool in goal setting)

The Pace Calculator can only work well if the runner knows two of the three data points.

In addition, the Pace calculator should offer the ability to record the distance, time and pace of a given run in either a database and/or spread sheet. The runner has the option to input only one data point into the Pace Calculator for saving; no calculation would be possible via the application. If two of the three data points are entered, the pace calculator would calculate the third data point (saving the time, disatnce and pace for a given run). The Pace Calculator would also enter the date of the run entered by the runner.

New project idea

I just finished the Valley of Gold half-marathon, I did better than expected. I was surprised, shocked, emotionally overwhelmed, and very pleased to see people that I know from The rec center at work out there. They were on their bikes and cheered my on as I passed them going in the opposite direction. I don't know if they were there by coincidence, or by design, but it felt great to see them and I was very shocked and humbled that they were able to see me and cheer me on through the last quarter of the run!

My time for this run was 2:02:31 (my time, not the official time). Soon, I will see how accurate I am, but I did better than what I expected to do, so I was very pleased. During the drive home, I thought of a nifty application (for me) that could aid me in determining my pace. In truth, the pace is the only thing I am really concerned about--and it is not all that important. But, it allowed me to come up with a nifty application. I am sure other people have thought of the same thing, but I think it would be a good application to go ahead and create. Since no one reads this blog but me, it is what I would call a "pace meter". A runner would input their time and distance, and the application would calculate the pace. Or, the runner could enter the distance and pace, and the calculator would calculate the time. Or the runner could enter the pace and time (although this seems a little redundant), and the calculator would the distance. In other words, I want to know at most three things when I am running: distance, time and pace. The application I envision is if the runner inputs two of the three data points, and the application calculates the missing data. The application would give the user the option to save off the data in a spread sheet and/or database (for the OCD runners). This would be an excellent option for shoe mileage tracking. It would give me a chance to work on something in my own spare time, and to me, it would be a great application.

Well anyway, something to think about.