Professional Documents
Culture Documents
Introduction...........................................................................................................................................2
Problem Definition.................................................................................................................................3
Method..................................................................................................................................................4
Analysis..................................................................................................................................................5
Use Case Diagram...............................................................................................................................5
Manage Members Diagram................................................................................................................6
Manage members fully dressed use case: (Nasser)........................................................................6
Manage Swimming Results Diagram..................................................................................................8
Manage swimming results fully dressed use case (Dmitrij)............................................................9
Manage trainers Use Case................................................................................................................10
Manage trainers fully dressed use case (Maresh)........................................................................11
Manage payment fees......................................................................................................................12
Manage payment fees fully dressed use case (Robin)..................................................................13
Construction.........................................................................................................................................15
The Program.....................................................................................................................................15
Dolphin Swimming Club – Administration Program 1
Some important parts of the code...............................................................................................18
Bugs..................................................................................................................................................21
Conclusion............................................................................................................................................23
Sources.................................................................................................................................................23
23
Managing a Facility 23
23
According to the project definition it is a part of our assignment to analyze the problem in
general and find the best methods and solutions to tackle the development of software so it would
satisfy all the necessary criteria’s. The goal was to develop software that would be able to manage
and administrate a swimming club, which has a huge variety of aspects. There are members of
different athletically class, age, gender and goals. Each of them should be stored differently from the
rest. There are also different types of facilities, offers and training programs to be stored and
managed by software automatically.
The system that we developed should be able to handle management of members and their
results. It also provided with the financial part, which can keep track in total payment amount for a
different type of user.
We have to provide the main panel with the buttons using the Graphical user interface that
makes it easy to access the main functions. The use of the Graphical user interface is the main tool
that makes it possible for the common user to understand and being able to handle the program in
the correct way.
Dolphin Swimming Club – Administration Program 4
“The Dolphin” swimming club offers a huge variety of swimming facilities and different
training programs. This is also mentioned in our program, and these settings are stored so they could
be accessed or edited at any time.
There are different types of swimmers, and that should also be taken in consideration while
developing the programs structure. Some swimmers are amateurs that attend the training sessions
to stay in shape, and some are the once that compete, and are interested in achieving the best
results. There is also a group of the participants that are over the age of 60, the so called veterans.
They should be treated differently. Elite swimmers attend regular training sessions and they have a
personal trainer assigned. According to the results they are offered a financial discount.
23
How we started?
The first step into the beginning of this project we took a look at the client requirement, in our case,
the case Eva gave us. In the first meeting we organized ourselves as a team and decided that our
team manager will be Robin Olsson and also made an agreement about team rules and organization.
Project Start
Using the template, in the first week, we identified the system requirements and identified actors
and major use cases, and made a broad analysis of the use cases and interaction.
Second week
In the second week we assigned each of us one of the use cases and made a full dressed use case.
After the weekly review we also made the use case diagram to get grasp about how is the interaction
between them and between user and system.
Third week
Third week was a tricky one. We had to design the diagrams. We decided that the diagrams that
were relevant
Dolphin for ourClub
Swimming project was the Class Program
– Administration diagram and Sequence Diagram. At the end of the week 5
we made a review of the diagrams and we were not very pleased with the result and decided that we
should change it during building stage constantly adapting to the written code.
Fourth week
Because of boredom and the need to get contact with the finished result, or at least some of it, in the
beginning of the week we made a paper prototype describing the basic skeleton of the GUI.
At the end of that week we had a working GUI describing the skeleton of the two main use cases that
we decided to program.
Fifth week
In the fifth week the first iteration coding part started. We concentrated on the Member
Management Use Case. We created the add-, edit- and delete function, fully functional, easy to use
and self-explanatory. We didn’t concentrate at all at graphic design of the interface and considered
that functionality, utility and reliability is more important. In the meantime half of the group started
to design the result management part.
23
This week was assigned to the second iteration coding. It was all about Result Management. This part
was much easier than coding Member Management, not because the design was less complicated,
but we had the experience and we found some pattern in adding and saving members and results.
Seventh week
Final week was crazy trying to put everything together and make sure that everything is in place. We
also made report conclusion. About the diagrams we decided that we should use reverse
engineering, automatically generate the class diagram using our final code
Analysis
23
23
The Manage Members Use Case contains functions such as; edit, add, delete member and assign
membership type.
Add: To add a member the user simply clicks the Add button in MemberGUI. This will open a new
window containing a form where the user adds information about the member, as well as the
membership type. The user has to fill out all the required fields, or the program will urge the user to
do so before the member can be saved. This is shown with graphics under The Program-part of this
report.
Edit: To edit a member you first select the member to be edited, and the same form as the add
button generates will be show, this time pre-filled with the selected member’s information.
Delete: Also here you select the member to be deleted, and click the delete button. This will generate
Dolphin Swimming Club – Administration Program 8
a confirmation window to make sure the user really wants to delete the member.
Level:
User goal
Primary actor:
-The club chairman wants to add new members, edit existing members (junior to adult for
example) or deleting existing members., categorizing the members according to their
age( junior-adult-senior ) 23
-The club wants the management to be easily done and to save time and money.
Preconditions:
Post conditions:
The new member was successfully added to the system and the payment was done.
The member got his membership card and he can use whenever he come to the club.
The member’s info. are edited if there was a mistake or status change.
The member is deleted from the database, if he don’t want to be a member any more.
The member should exist in the system database in order to be deleted or edited.
Extensions:
23
Special requirements:
A backup is occurred just after any new changes had been made to the system.
Show top 5: This is supposed to show the top5 results in all disciplines
Show competition/training results: Shows all the result for all member in a specific discipline
Show individual results: shows all the results in all disciplines for a specific member
23
The system to store and manage the sports clubs achievements, results, participants,
competitions and other suitable information.
Level
Sub-function.
Primary Actors
Administrator
Participants
System
Dolphin Swimming administrator
Club should
– Administration be logged in.
Program 11
The swimmer is the member of the club.
Time results must be precise.
The data is being handed in to the administrator, and the administrator processes
and organizes it.
Success Guarantee
Extensions
Special requirements
Assign trainer to swimmer: select a member that the trainer should be responsible for
23
Primary- System Administrator is usually the club chairman but also can be the trainer. They are
responsible with membership information and coaching.
Supporting- The system is the one who will be responsible with storing all information and making
suggestions about coaches and disciplines.
Offstage- members that are elite swimmers want to have assigned a coach
Trainer- needs to have a trainee list so he can make a schedule for each pupil
System administrator and club management want that each elite swimmer is assigned
one or more coaches according to his disciplines so that the swimmer will get the proper training.
Elite swimmer members want to get the proper training according to their disciplines.
Preconditions
The swimmer
Dolphin Swimming is registered asProgram
Club – Administration an active elite member and he is up to date with all 13
payments.
Post conditions:
All information is accurate, to the elite swimmer at least one discipline is added and accordingly to
the discipline he has the proper coach assigned. The data should be stored and available to use at
any time.
Scope
Create a system that is able to add disciplines and according coaches to each elite swimmer but also
is able to add or edit afterwards new disciplines and change coaches.
Success guarantee: Information is stored as fast as possible, accurately saved in the database.
Extensions
1. Log in required
2. Member must be elite swimmer
3. If desired discipline is not existent will be manually added
4. If member doesn’t agree with coach can choose one manualy
Manage payment
Dolphin Swimming fees
Club – Administration Program 14
Assign payment fee: this is auto generated when a new member is added, by calculating the age and
comparing to membership type.
Edit payment fee: also auto generated when membership type or age is changed
23
Level:
Sub-function
Primary Actors:
Treasurer
other admins
- Payment guy: Wants to keep track of members who have fallen behind with their
membership fees.
- Other admins: Want to be able to assign each member with the right membership fee
according to age, level of membership etc.
Dolphin Swimming Club – Administration Program 15
- Member: Wants to join the swimming club without any problems, and wants to have the
right fee attached to his/hers membership. Also wants to be informed if payment is overdue,
so that membership is not revoked.
- Swimming Club: Wants to accurately record transactions and satisfy customer interests.
Wants to ensure that payments is done, and if so recorded. Wants to be informed if
members fall behind with payments. Wants automatic and fast update of membership fees.
Preconditions:
Extensions:
1. a) if any members have fallen behind with payment, the system will notify the admin
directly after logged in, before he can select any members.
b) if the member does not exist in the system, he/she must be added before they can be
assign a membership fee. (manage member use case)
Special Requirements:
- A fast updating database to store member information, and to notify as soon as a member
has fallen behind with payment.
- A GUI that also shows a list of members who have fallen behind in a pop-up window.
Frequency of Occurrence:
23
Start page
We decided to make the design of the program as simple as possible, so that the user clearly can see
how to use the program. Thus, the start page has only three buttons; Members: opens a window
with existing members, Results: opens a window with results for each member, and About: shows a
message dialog box with information about the developers.
Members page:
in the members page you see a list of all registered members with information about membership
type, preferred discipline, expiration date, fee etc.
If any of the members has overdue payments, the program will show a message dialog box that
informs the user that there are member(s) with overdue payments. This is also shown next to the
Dolphin Swimming
expiration Club
date for that – Administration Program
member. 17
After changes are made, the user clicks the Update Members button to refresh the list of members.
23
23
To add a member the user simply clicks the Add-button and a new form will appear where the user
can add information about the new user.
23
23
When clicking the Results button the user get a new window showing the best result for each
member. While here you can choose to Show Member History, that shows all results for that
member. There you can add or delete results for the selescted member.
The user is also supposted to be able to see top5 results, a function that is currently not finished.
Dolphin
Some Swimming
important Clubof
parts – Administration
the code Program 21
The mechanism of using files as data holders (instead of Databases) works like this. We created a
member class that will store all member information like name, ID (CPR), age, gender, membership
type. And we created a memberList class in which we have an array list of members (future called
just list), and the method that will add new members to the list. The first thing we do when we load
the program is to read the list from the file, so we don’t lose any previous information. In order to
split the task we also made a method that will process one line at a time that is called inside the read
method.
// read members from file and store each member as it's own element in
ArrayList
public void readFile(File file) throws FileNotFoundException{
input = new Scanner(file);
String line;
// read file line-by-line and process each line
individually in processLine() method
while(input.hasNextLine()){
line = input.nextLine();
processLine(line);
}
} 23
// process each line from the file and save data into member object, and
store that object in MemberList
public void processLine(String line1){
// declare variables that will inhabit the Member
object
String s;
Member m = new Member();
ArrayList<String> dis = new ArrayList<String>();
line = new Scanner(line1);
while(line.hasNext()){
s = line.next();
m.setMembershipType(s);
s = line.next();
m.setActivationDate(s);
s = line.next();
m.setID(s);
s = line.next();
m.setGender(s);
while(line.hasNext()){
dis.add(line.next());
}
m.setDiscipline(dis);
list.add(m);
}
}
This part of code is interpreting the line as information about the members, doing in the same time
some kind of validation (like reading more disciplines if the member is active in more, or reading
members with multiple names), reading and adding members inside the ArrayList.
23
The save method it’s simply using a PrintStream and overwrites the old file, and putting instead a
new file containing latest information, one member per line.
In the same way we save results, but there as a file name we use the CPR.
For each window we create a GUI class. Except the first window we make them all hidden, running in
background.
Dolphin Swimming Club – Administration Program 23
In each GUI class we declare the objects (forms) that we are going to call from the current form.
Whenever we want to see the other windows (e.g. Click add button), we call a method named
.setVisible(true), and set as default close operator HIDE_ON_CLOSE(); Just for experimenting
purposes there is a case where we didn’t use the method but we made the frame field public so we
could access it from outside the class (encapsulation fail).
addGUI.setFrameVisible(true);
23
frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
We didn’t find a major inheritance pattern. The only place where we used
inheritance is between two very similar forms, add and edit form. Edit form
inherits add, because the only difference is that edit form will have some extra
methods that will make all fields to be filled with the data of the selected
member.
Bugs
We had some bugs along the way, and some of them took quite some time to solve.
Most of the bugs were solved by searching the internet, other were solved after a long time of
debugging, discussion and testing.
23
23
Due to the limited amount of time we had to finish this project, we felt we had to start programming
as soon as possible. And because we didn’t have the coding requirements we got a bit stressed and
kind of overlooked the importance of making the diagram to help us along the way.
Now we realize that we should have put more time into making the diagrams, which in the distance
would have helped us making the code. On the other hand, we didn’t possess the knowledge to
make really helpful diagrams at the time.
With that said, let’s evaluate the software. Even though there are some parts of the program that are
not completely finished e.g. viewing top five and missing field validation when adding results, the
swimming club will at this time have a program that will store members and their results in
competitions. Thus, it will reduce the time it takes to manually store all members and results.
This project helped us realize the importance of diagrams and to see the connection between
software design and construction. It was very educational due to the fact that we got a lot of
Dolphin Swimming
programming Club –and
experience, Administration
learned a lotProgram
of things that we didn’t know how to do before in Java. 26
With that in mind, this project gave us much more than just an idea of how future projects will look
like.
23