Please enable JavaScript to use CodeHS

AP Computer Science A (Cortado)

Receipt Lab

Students will write a program that incrementally builds the functionality to generate receipts, similar to those received from stores and restaurants. They will start with a simple snack bar receipt and later develop a more advanced version that collects user input to produce customized receipts.

This lab can be used after Unit 1: Using Objects and Methods in Cortado, Unit 2: Using Objects in Nitro, and Unit 3: Methods in Mocha.

Lessons

6.1 Activity 1 - Basic Receipt

  • Basic Receipt
  • Activity 1 - Check for Understanding

6.2 Activity 2 - Enhanced Receipt

  • Enhanced Receipt
  • Activity 2 - Check for Understanding

6.3 Activity 3 - Including Random

  • Including Random
  • Activity 3 - Check for Understanding

6.4 Activity 4 - Interactive Receipt

  • Interactive Receipt
  • Activity 4 - Check for Understanding

Courses that include this module