Search⌘ K
AI Features

Build with Prompts

Explore how to build the core functions of a Budget Tracker in C++ by implementing addIncome and addExpense. Learn to use AI-generated prompts to scaffold remaining methods and test an interactive command-line interface. This lesson helps you gain practical skills in function implementation and AI collaboration for coding.

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 run. ...