Group_B3_First_Prese..

Download Report

Transcript Group_B3_First_Prese..

SFTW241
Programming Language
Architecture
Grouping Presentation
•
Why we need the grouping
•
How many grouping method
•
The advantage of grouping
Grouping Method Review
• The random draw method
• Unconstraint grouping method
• The method based on subjective
and extension
Contents
Part 1:
Introduction to the grouping process
Part 2:
The program and the principle
Part 3:
The advantage,disadvantage,conclusion
Grouping
analysis and
architecture
Part 1
Preparative
a) Everybody write down the first
three favorite people’s names on
paper
b) Ensure the number of group
c) Make sure the first member of
every group
Start Grouping
• Take out the paper of every group’s
first member
• Check if every group’s first member’
first favorite people is selected
Checking and grouping
• We have two results
a) if no, then the people become the
corresponding group’s second member
b) else, check the second favorite people
again even the third, if all are selected,
then the choice turn to the next group
Continue
• Take out every group’s second
member’s paper and do the same
checking and grouping just as the
process of above
• Do just as above for the third
member
Possible Results
• a) The best result is all the people
are average sorted
• b) if some people are not belong to
any group, then we use the random
select method to solve this problem
The Result
1
2
3
4
1
Eric
Sam
Yedda
2
Zhao
Difei
Tang
Hualiang
Sun Jie
Qin
chao
Hillman
3
Yang
Yiyang
Walter
Lan
Wang
Jiongquan Fuzhen
Yu EN
Li A
Member
group
4
Zhang
Lulu
Liu Di
Grouping
analysis and
architecture
Part 2
Grouping
The first question is how to get the
main idea?
Our idea is that:
• 1.Get the choices by order: the first,
the second, then the third.
• 2. Check whether the choice has
already been chosen by some one
else.
Process In Practice
• A simple program to show more
details of the grouping.
• At first, we do some pre-processing
on the data. (easy and simple)
• Every list of the grouping
requirement was thought as a data
union.
Continue
• A simple union include such
information:
1.Name
2.The first choice
3.The second choice
4.The third choice
And there information were stored as
string.
Continue-structure
For the some special needs, we have
to use two array:
• 1.leader array: which contain 4
strings corresponding to 4 teams.
(LA)
• 2.member array: which contain 16
strings. (MA)
Continue
• At first load the information of the
four leaders into the leader array, for
we have chosen the leaders by lucky
*.
• Load the rest information of the
classmates into the MA.
• Then four leader’s information were
loaded into the rest positions of the
MA.
Example
THL
LJQ
WFZH
Index ( i )
UN
YEDDA
SUN
ZDF
Member Counter
Walter ERIC
YYY
Process
• Information checking is the most
important step of the process.
• In our way, we use MA both for
information store and checking.
• The pointer: member Counter is the
boundary between un-used
information and used information.
Information Checking
• The source code of the information
checking:
Example
ZDF
THL
……
……
LJQ
THL
WFZH SUN YEDDA
UN
ZDF Walter ERIC
Counter--
Index ( i )
Member Counter
YYY
Process In Leader Array
• If a new member is added, then she
or he become the new “leader” whose
information will be loaded into the LA
instead of the older one.
Leader[1]
Leader[2]
Leader[3]
Leader[4]
Eric
ZDF
YYY
Walter
……
……
LJQ
……
……
……
WFZH
……
……
……
Walter
……
REPLACE
LJQ
YYY
LJQ
WFZH
Where will it stop?
• If all of the choices of a “leader” have
already been in used array, then the
corresponding team should stop their
grouping.
Another Method
• Our example program is the array
version, it is easy to use and
understand.
• The disadvantage is the replacement
step, in my opinion, it will delete
some information through we will not
use them again after the checking.
• May it is better to use link-list
structure.
POINTER
YYY
LJQ
WFZH
LJQ
YYY
YYY
WFZH
LJQ
LJQ
Walter
WFZH
Walter
CANCLE
YYY
LJQ
REPLACE
WFZH
Walter
LJQ
WFZH
REPLACE
YYY
YYY
LJQ
LJQ
WFZH
Walter
Something Error
I will show it in our example program
Grouping
analysis and
architecture
Part 3
Advantage
• It is a fairly method, Avoid top students
work together.
• Break the old rule that good friends
compose one group. Make more
opportunities communicate with each
student.
• Don’ t let group members feel unfamiliar
by the prior select way.
Disadvantage
• Inconvenient
• Waster time
Conclusion
• Connecting people
Create bridge to communicate
Let’s exchange idea more easier
• Share resources
Make the resources optimize arrangements
Produce the new point of view
• Enjoy team work
Enable work less, happy more
Thank you very much