***** Lab 1 ***** .. warning:: To compile you should use a CMakeLists.txt. It takes sometimes to get use to it, but it makes the compilation much easier. Class templates =============== 1. Create a class template :code:`Position` that will store the position in a 2D environment. The position can be :code:`int` or :code:`float`, etc. 2. Create a class template :code:`Rectangle` that will contain the origin position and the size of the rectangle. For the size use the class position too. 3. Create the a function :code:`getArea()` that will calculate and return the area. 4. Create the getters and setters. 5. Define the following operators for the class :code:`Position`: * :code:`operator==` * :code:`operator<`, we want to compare the area. * :code:`operator>`, we want to compare the area. Function templates ================== 1. Create a function template :code:`const Comparable& findMax(const vector& a)`. 2. This function should be able to accept a vector of :code:`Rectangle` and return the one the maximum area. 3. Create a function :code:`int BinarySearch(const vector& a, const Comparable &x)`. That allow to search for a rectangle in an ordered vector of rectangle. LeetCode ======== If you are done you can start doing the following problems on LeetCode: * https://leetcode.com/problems/min-stack/ * https://leetcode.com/problems/range-sum-query-immutable/ * https://leetcode.com/problems/binary-search-tree-iterator/ **ENSURE WE HAVE RECORDED YOUR COMPLETION. FAILURE TO DO SO WILL RESULT IN A GRADE OF 0!**