PseudocodeCompiler·by Sherlemious
DocsLearnPracticeExam
FlowchartPricing

AS & A Level Path: all lessons

Level 1: Records (free)

TYPE … ENDTYPE, dot fields, copy by value, array of records

  • A record groups different types
  • Assigning a record copies it
  • Output the matching mark
  • Look up one field
  • Record or parallel arrays?
  • INPUT a field
  • Boss: names at or above a mark

Level 2: Types (free)

CASE ranges, DATE, enumerated types

  • CASE labels can be ranges
  • Several values, one branch
  • DATE compares in calendar order
  • An enumerated type has an order
  • Which type is it?
  • Boss: earlier date, then a grade

Level 3: Parameters (free)

BYVAL copies, BYREF changes the caller, and BYREF sticks

  • BYVAL leaves the caller alone
  • SWAP needs BYREF
  • BYREF sticks until BYVAL
  • A function returns a copy
  • Reference or copy?
  • Boss: update the price in place

Level 4: Random files

OPENFILE FOR RANDOM, SEEK, PUTRECORD, GETRECORD

  • Write a record, read it back
  • Store a name at a position
  • Update a record in place
  • Random file or text file?
  • Boss: two records, then pick one

Level 5: Pointers

^ for the address, ptr^ for the value, SET OF and DEFINE

  • A pointer holds an address
  • Writing through the pointer
  • A pointer to an enumerated value
  • DEFINE a set
  • Address or value?
  • Boss: add through a pointer

Level 6: Stack & queue

LIFO stack, FIFO queue, circular wrap with MOD

  • A stack is last in, first out
  • Write Pop
  • A queue is first in, first out
  • A circular queue wraps with MOD
  • Stack, queue, or either?
  • Boss: reverse four integers

Level 7: Lists & trees

Array linked list, binary tree insert, in-order walk

  • Follow a linked list
  • Add items, then print them
  • In-order walks a tree sorted
  • Write the in-order walk
  • Null pointer, free list, in-order
  • Boss: find a value in the list

Level 8: Classes

CLASS, PRIVATE, NEW, INHERITS, SUPER

  • A class has fields and a constructor
  • PRIVATE is enforced
  • INHERITS and SUPER.NEW
  • Call a method in a loop
  • Object, record, or parent?
  • Boss: an account with a deposit
TermsPrivacyRefundsContact