Please enable JavaScript to use CodeHS

AP Computer Science A (Cortado)

Celebrity Lab

Students learn how to discuss class design as it relates to the game Celebrity, where a person or team tries to guess the name of a celebrity from a given clue or set of clues. This lab includes inheritance as the basis for one of the activities and also includes a Graphical User Interface.

Note: this lab contains topics (inheritance) that are now considered out-of-scope for the AP CSA exam. In order to complete this lab, students will need to learn about those topics beforehand, in addition to completing the recommended units below.

This lab can be completed after Unit 4: Data Collections in Cortado, Unit 9: Inheritance in AP CS A (Nitro), and Unit 4: Classes and Object-Oriented Programming in AP CS A (Mocha).

Lessons

13.2 Activity 2: The Celebrity Class: A Simple Version

  • Celebrity Class: A Simple Version
  • Celebrity Constructor

13.3 Activity 3: Putting it All Together

  • Set up Constructors
  • Setting up the Game
  • Complete Game Play Methods
  • Check Your Understanding

13.4 Activity 4: Extending the Celebrity Class

  • Extending the Celebrity Class
  • Literature Celebrity
  • Custom Celebrity
  • Updating CelebrityGame
  • Updating the GUI

Courses that include this module