Design and Use 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?

  2. What would a Box be used for?

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

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

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


Hand-in

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

https://wpi.qualtrics.com/jfe/form/SV_1BpKesBwB15LX1Q

Make sure to include the names of all group members.

Happy box-ing!

– Mark