H+Data+Types

media type="custom" key="29539401"


 * Questions**

1. Which data type would you use to store: (a) The first line of an address (b) A person's weight (c) The number of computer games a person owns (d) A student's exam score (e) A student's average exam score (f) The entire class's exam scores (g) Information about a football team: Name, year founded, strip colour, manager, trophies won (h) Whether a traffic light signal is green or not

2. What is the difference between an array and a record

3. What is normally the first index in an array

4. Write the pseudocode for a program which loops through an entire array of integers, calculating the total

5. A classic car club uses a program to store data about members as follows. A sample record looks as follows:

member_id: CC005 forename: John surname: Simmons car: Porsche 911 year: 1998 member_discount: True

(a) Use pseudocode to declare the record structure required for a member record

(b) The program uses an array of records to store all members. Use pseudocode to declare an array called members which will store 100 members

(c) Use pseudocode to loop through the array of records and display the forename, surname and car of each member