Designing a Box

Groupwork

Assume you need to design a 2d box for Dragonfly:

    class Box {
    
      // Attributes.
      private:



      // Methods.
      public:
      
      
      
    };
  1. What state does your Box need to keep track of? So, what attributes and methods does it need?

  1. What would a Box be used for?


  1. What changes to Dragonfly are needed to support #2?


  1. What are all the cases of two boxes intersecting/overlapping? Draw some pictures.


  1. What is an algorithm to determine if two boxes overlap?

Hand-in

Have ONE person from each group submit the group's answers:

Make sure to include the names of all group members.

Happy box-ing!

-- Mark