This assignment exercises your understanding of operator overloading in C++.
You must overload all appropriate operators.
As with other design details, type definition is concerned with consistency.
Focus on the expectations of the application programmer.
Use ProgrammingByContract for documentation.
DO NOT hard code.
Part I: Class design
Overloaded all appropriate operators for the P3 classes: imageCollage, bitCollage, cyclicCollage
Recall the differences between each type and realize that it is unlikely that inherited operators will suffice. Note specifically that cyclicCollage encapsulates a shift value and that bitCollage encapsulate an odd/even control data member.
Comparison should be widely supported for all types.
Addition MUST be supported and should support ‘mixed-mode’ arithmetic – that is, it is reasonable to add a cyclicCollage to an imageCollage
Design to accommodate the ripple effect(s) of supporting addition
Clearly, many, many details are missing. You must use operator overloading.
Make reasonable design decisions so that your classes satisfy the stated goals, communicate assumptions and use, and yield clear and maintainable software.
Use ProgrammingByContract to specify:
pre and post conditions; interface, implementation and class invariants.
Relationships should be noted in the appropriate invariants.
You MUST implement the full functionality of the classes from P3.
Part II: Driver
Demonstrate program requirements: Do not skimp on your driver’s design
Clearly specify the intent and structure of your driver
You should have collections of distinct objects, initialized appropriately, i.e.
random distribution of objects with arbitrary initial values (values should be reasonable)
meaningful base values for non-arbitrary initial values, etc.
Comments from previous assignments still apply. As before, upload your files to both Canvas and cs1.