Search⌘ K
AI Features

Build with Prompts

Explore how to develop the core methods addIncome and addExpense for a Budget Tracker app using C++. Learn to structure data and functions clearly, create an interactive CLI, and leverage AI to generate additional functions. This lesson helps you bring your project to life by testing functionality while preparing for future refinements.

In the previous lesson, you:

  • Chatted with a simulated client and gathered needs.

  • Converted notes into functional requirements.

  • Created a clean skeleton of eight method stubs.

Now, we’ll bring it to life. We’ll start with two core methods, and then use AI to scaffold the rest. You’ll also get quick tests and a full reference solution.

We’ll keep a tiny in-memory data model:

In C++, we can use a few global variables to support our CLI prototype. At the top of the file, we’ll define the program’s memory, which stores the data that everything the Budget Tracker needs to ...