EC327 2009 Lab4

EC327 2009 Lab4 -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: EC327
Introduction
to
Software
Engineering
 Lab
#4
–
Due
Tuesday
Nov.
24,
2009
‐
8
pm.
 Name:
___________________
 BUID:
___________________
 Lab
guidelines:
 You
are
expected
to
do
individual
work
on
lab
assignments.

You
are
welcome
to
discuss
the
general
 approach
with
classmates,
but
all
final
work
must
be
done
individually.

Please
refer
to
the
Collaboration
 section
of
the
class
syllabus.

Labs
should
be
demonstrated
to
the
Lab
Assistant
or
the
U/GTF
during
lab
 hours
in
PHO
307
(unless
otherwise
indicated),
and
all
code
must
be
printed
out
and
handed
in
along
with
 this
grading
sheet
at
the
same
time.

 
 Part
1
[100
points]
 This
lab
covers
Linked
Lists,
and
more
specifically
adding/deleting/sorting/searching
 data
records
using
Linked
Lists.

As
such,
you
must
use
pointers
to
manage
your
Linked
 Lists.

The
objective
of
the
lab
is
to
read
in
a
file
with
the
following
format
and
create
a
 Linked
List
structure
based
on
it:
 1.
[10
pts]

At
command
prompt,
your
program
should
be
passed
a
filename.

It
should
 check
the
existence
of
the
file
and
take
the
appropriate
action
if
it
does
not
exist.

If
it
 does
exist,
your
program
should
read
in
the
file
and
create
the
appropriate
Linked
List
 structure.


Example:

./lab4
studentRecords.txt
 2.
[10
pts]

Your
program
should
present
the
user
with
a
text‐based
menu
system
and
a
 command
prompt
as
follows:
 [1]

Display
records
 [2]

Save
records
 [3]

Insert
a
new
student
record
 [4]

Delete
a
student
record
 [5]

Sort
based
on
field
 >
(the
user
types
in
their
command
at
this
prompt)
 Use
the
system(“clear”)
command
to
clear
the
screen
between
menu
displays
and
user
 actions.

You
should
also
do
range
checking
on
the
number
entered.


 Depending
on
the
number
you
need
to
take
the
following
actions:
 3.
[10
pts]

If
“[1]
Display
records”
is
selected,
you
should
display
all
of
the
records.
 4.
[10
pts]

If
“[2]

Save
records”
is
selected,
prompt
the
user
for
a
file
name,
and
save
 the
records
in
the
same
format
as
you
used
to
read
them
in.
 5.
[20
pts]

If
“[3]

Insert
a
new
student
record”
is
selected,
you
should
prompt
the
user
 for
the
new
student’s
information.

Do
as
much
error
checking
as
you
think
is
important,
 making
sure
that
you
leave
no
empty
fields.

You
should
prompt
the
user
again
if
any
 EC327
Introduction
to
Software
Engineering
 Lab
#4
–
Due
Tuesday
Nov.
24,
2009
‐
8
pm.
 empty
fields
are
entered.

Once
this
information
has
been
input,
you
should
then
insert
 the
new
node
into
your
Linked
List.
 6.
[20
pts]

If
“[4]

Delete
a
student
record”
is
selected,
you
should
prompt
the
user
for
 the
student’s
ID
number,
search
for
it,
and
remove
it
from
the
Linked
List.

Display
the
 number
of
iterations
that
took
to
search
for
it.
 7.
[30
pts]

If
“[5]

Sort
based
on
field”
is
selected,
you
should
prompt
the
user
for
the
 field
based
on
which
the
sort
should
occur.

The
user
must
be
able
to
sort
on
any
of
the
 fields
(ID
Number,
First
name,
Last
name).
 The
input
file
is
a
simple
text
file
with
the
following
content:
 111111
 Jane
 Doe
 
 222222
 John
 Doe
 Names
are
one
word
each,
there
is
an
empty
line
between
record
entries.
 Extra
credit
[20
pts]
 Add
a
sixth
menu
item
that
enables
the
user
to
edit
any
of
the
fields:
 [6]

Edit
student
information
 The
user
should
be
prompted
to
enter
a
student
ID
number,
then
provided
with
the
 ability
to
change
any
of
the
fields.


 What
to
hand
in:
 Please
provide
a
typescript
capture
on
instance
each
of
inserting,
deleting,
and
sorting
 based
on
two
fields.
 Please
print
and
staple
all
source
code
to
this
grading
sheet
when
handing
in.
 
 Date
Handed
in:
___________
 
 Grader:
___________
 
 Score:
___________
 ...
View Full Document

This note was uploaded on 11/09/2010 for the course ECE 327 taught by Professor Babakkia during the Fall '09 term at BU.

Ask a homework question - tutors are online