Assignment 5

entomologistsamoanΛογισμικό & κατασκευή λογ/κού

15 Αυγ 2012 (πριν από 5 χρόνια και 4 μήνες)

363 εμφανίσεις

DERPro (Disaster Emergency Response Project)

For Assignment 3

and 4
, LISCH
, EISCH and LICH

algorithm
s are

used in order to place 50.000 patients
into
each 50K, 100K, 150K
hospital

room
s.
These

algorithm
s

are

applied on 3 scenarios where
hospital
s
have

50K, 100K and 150K rooms respectively.

For
Assignment
5
,

you will continue on
previous
project

framework

and
replace algorithms with Brent’s Method and Linear Quotient
in
order to place 50.000 patients into hospitals for
each

scenarios.


-

150 Points in T
otal

-

(
20

Points)
Before give a start to implementing program, following rules must be applied to source
code!!!

To get
20

Points, all the rules should be applied together!

1)

Student Name, Lastname, ID, Assignment and date must be included at the top in
comments!

2)

Indentation

rule must be applied

3)

Comments

should tell what is implemented
,

briefly

4)

More
white spaces

than black spaces, code should not be written so tight

5)

Secure program

is preferable.

O
nce the program is blew,
that program is not considered as
a

trusted
one
.


a.

Files should be closed when done.

b.

Warning should be returned if a file can not be read or a record can not be written into.

c.

Program should continue the usual flow if error occures, errors should be recovered
somehow. (You may use default v
alues if error occures)



(10 Points) Please,
name solution archive (.rar)

as
CSE343_Assignment
5
_StudentID
.rar

and send the
solution file
to
ebakir@cse.yeditepe.edu.tr
. When archive file is extracted, extra
cted project must
work or be compiled without error! Archive file (.rar) must include following;

a)

C

Sharp(without .exe files) or Java Netbeans Project

b)

Injured
Person List.txt (download

from website)

c)

S
tatistics.txt

d)

Do not
include

result files since result
files will be created after program is
finished


To Do List:

1)

Same

injured person list
will be used again
.

You
will

continue
on previous
project
framework
, done with LISCH
, EISCH and LICH

algorithm
s
.

Now,
Linear Quotient and
Brent’s Method

algorithms will

be
added
.

Address space
s

must be
created

with
Linear
Quotient and Brent’s Method
.

Yo
u must handle collisions with
Linear Quotient and
Brent’s Method algorithms
.

2)

(
30

Points)
All injured persons must be placed into
hospital

rooms

in each scenario
.
When a
hospital is done,
address space (HASH)

must be written into file named by

(Algorithm Name)_Hospital_(Hospital Number)_HASH.
txt”
. New file
must
show

user
the followings

(
Empty rooms should be shown as well
)
;

a.

Address space (# of room)

b.

P
atient id

3)

(30 Points)

When all injured personel
s

are placed into hospital rooms, NOW, you have to
access all the patients using the
each patient’s id

in
the

HASH FILE
, created after
insertion process
.

(What do you understand of a word “probe”
?? Insertion is not enough
where we

have to access patients that we have placed them into rooms
)

4)

(30 Points)
P
rogram must
calculate

and
print
results into statistics.txt

(6 in total)

a.

Name of
algorithm

b.

Hospital Capacity

c.

Number of Probes

d.

Number of Collisions

5)

(
30

Points)
Finally,
w
hen program
done with
elapsed times

for
each process
,

the program
MUST recommend

user
the best fit algorithm

for each hospital
in terms of insertion
time and accessing time

(3x2 in total
)
.

(What is purpose?
F
ast
insertion
or

fast access
)

6)

Graphical User Interface is
required since user should access patients with both LQ and
BM algorithms

If you have a problem, please, feel free to contact.


Good luck!