Discussion 3-14

Today we did one last class example, while also demonstrating how to break code up across several files. This layout is how people structure their code "in real life". The point is that if I change one class, the other files don't generally need to recompile, which saves a lot of compiler time in bigger projects. Here are all the separate files we made:

  1. Point2D.h
  2. Point2D.cpp
  3. Triangle.h
  4. Triangle.cpp
  5. main.cpp