CJCoding With Joseph
15free / daySign inCreate account

main.cpp - Program Walkthrough

Assignment 2 - Recurrence - SM 25

This page explains how to write a simple main() function to test the RecurrenceSequence class. It uses five logical steps to walk through how to declare objects, use class functions, and display results.


1. Create Two Sequence Objects

We start by creating two empty RecurrenceSequence objects named A and B. These are just containers for now.

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
  • Mock exams marked by hand, with feedback
  • 3,000 AI tutor tokens / month
  • Personal SQL database (3 MB)
  • Progress tracking

Cancel anytime.