IPT - A Virtual Approach IPT A Virtual Approach by Peter Whitehouse
Quick Links:
 
 
Information and Intelligent Systems Social and Ethical Implications Human Computer Interaction Software and Systems Engineering eXercise Files Course Outline and Assessment A-Z of Geeky Acronyms Terrace Work Program 2004 Sillybus FAQ = Frequently Asked Questions Help
 
 

eXercise #16

Compound Data Structures - The RECORD

  1. 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.

  2. 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.

  1. 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.

  2. 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

wonko@wonko.info
©Copyright t 1992..2017+. Edition 25.150117
wonkosite
Creative Commons License
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 2.1 Australia License
.