hts.StevenWood.com

Labs

Home ] Up ] Exercise 4-3-1 ] Exercise 4-3-2 ] [ Labs ] Quiz ][ Last Page ]

Relating Lists - Sample Lab Exercises

 

  1. Create a program that reads a list of names from a sequential file into an array, storing the name, and another array corresponding to their age. The arrays must be organized so that there is a 1-to-1 correspondence between the indices of the name and age. When the user enters an age, the names of all the people of that age should be displayed. The user should also be able to add, delete, and modify the names and ages entered.

  2. Create a program that creates and administers a true/false quiz. Questions are read from a data file into one array and a related array is used to store the answers, either T or F, for each question. When the user takes the test, questions are presented in random order, without repetition. Keep track of the number of questions answered and the number of correct answers. When the user has finished the quiz, display the mark as a percentage.

 

Source: Public and Catholic District School Board Writing Partnership Course Profile: Computer and Information Science, Grade 11, University/College Preparation ICS3U, Queen’s Printer for Ontario, 2001, adapted.

Home ] Up ] Exercise 4-3-1 ] Exercise 4-3-2 ] [ Labs ] Quiz ][Last Page]
All material on this site is copyright © 1997- by Steven Wood or as credited. All right reserved. Use of this site indicates you agreement with the  terms of use.
Send comments or questions to about this page.
Every attempt has been made to credit work under copyright. If there are any claims that copyright has been missed please contact the .
+SDG+