CSI2131 Assignment#2 Part-1 Solution

Designing the file structure…

Each Record has the following fields:
Field-1: Year (4-digit field)
Field-2: Semester (Fall, Winter or Summer)
Field-3: Course code (3 letters and 4 numbers)
Field-4: Course section (one character or, empty)
Field-5: Course title
Field-6: Instructor's name
Field-7: Course web page (optional)
Field-8: Instructor's home page (optional)

 

RECORD STRUCTURE:

The first four bytes of the record contains the fixed length fields

BYTE-1 : Contains "year" and "term" fields.

0 <=> Fall

1 <=> Winter

2 <=> Summer

1997 -> 0

1998 -> 1

...

2081 -> 84

YEAR

Fall (0)

Winter (1)

Summer (2)

(0) 1997

0

1

2

(1) 1998

3

4

5

(2) 1999

6

7

8

. . .

. . .

. . .

. . .

(83) 2080

249

250

251

(84) 2081

252

253

254