CJCoding With Joseph
15free / daySign inCreate account

University of Lethbridge - CPSC

RecurrenceSequence.h

Assignment 2 - Recurrence - SM 25

In this part of the project, you're going to create a header file called RecurrenceSequence.h. This file defines the structure of the RecurrenceSequence class. You'll declare all the variables and function prototypes that belong to the class here, but you won’t implement the logic yet. That will come later in the .cpp file.


Class Purpose

The RecurrenceSequence class is used to model a sequence of numbers defined by a recurrence relation:

  • S0 = a

  • S1 = b

  • Sn = p * S[n-1] + q * S[n-2] for n >= 2

Members only

Keep reading this lesson

You've reached the end of the free preview. Unlock the rest of this lesson plus 27 more lessons in University of Lethbridge - CPSC.

  • Unlimited coding questions
  • Unlimited access to all classroom material
  • Weekly live call for questions and guidance
  • 3,000 AI tutor tokens / month
  • Personal SQL database (3 MB)
  • Progress tracking

Cancel any time.