CJCoding With Joseph
15free / daySign inCreate account

University of Lethbridge - CPSC

Assignment Overview

Assignment 2 - Recurrence - SM 25

In this assignment, you will implement a C++ class RecurrenceSequence to model numeric sequences defined by:

  • S0 = a

  • S1 = b

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

You will store sequence values in a dynamic array (int*) and provide methods to generate and manipulate these sequences. Then, you will write a main program to read two sequences, combine them, scale them, and display results.

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.