eXercise #16
Compound Data Structures
- The RECORD
- Define
a type that specifies the record structure necessary to store personal
details including First Name, nickname, Surname, Phone Number, Email
Address, Street Address necessary to identify and contact a friend.
- Using
your definition from part 1, define an array of these records (up
to 100 of them, say) and then write routines (procedures or functions)
that:
- allow
the user to input details about a friend
- allow
the user to edit details of a friend
- prompt
for and accept a surname, output all firstname, surname combinations
with phone numbers that have that surname
- allow
the user to search by nickname and output on the screen all details
of that friend
- EXTRA
for experts: Produce a sorted list of friends nicknames with their
phone numbers.
- During the Database languages section of the course, you used the
music database. Each album was uniquely identified by a serial number,
had an album name, was released by an artist, through a company, on
a date, on a particular media. Additionally, each album had, say,
10 songs. Propose a record structure suitable for the efficient storage
of a record's details - ensure each record is a complete record,
if that makes sense.
- EXTRA for EXPERTS: Using a simple CRT app, an array of screen locations
(x, y, and character), make a 'bouncing ball' application where a
shape of ascii chars appears to bounce over the screen. COntinually
re-drawing this array will give the appearance of animation if you
move the 'ball' characters around. You do not need to do a full screen,
20x20 will be fine to prove the concept.
Solutions
|