Part 2 · Section 05

Project 2

This project revisits the regular polygons from Project 1 with the tools from the previous section. The Polygon class is immutable, so there’s no reason to recompute its area or perimeter every time someone asks; and the Polygons collection stores a list of polygons it may never need. You’ll fix both, turning eager code into lazy code without changing what the classes compute.

Lectures

  1. 01Project - Description✓
  2. 02Project Solution - Goal 1✓
  3. 03Project Solution - Goal 2✓

Practice: quiz & exercises

7 quiz questions · 3 coding exercises

Go to practice →