University of Lethbridge - CPSC
RecurrenceSequence.h
Assignment 2 - Recurrence - SM 25In 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 = aS1 = bSn = p * S[n-1] + q * S[n-2]forn >= 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.