CSE 241/505Object Oriented ProgrammingFall 2018Homework # 2Due date Oct 31st 2018In this homework, you will write your first classes for the shapes. For each class you will write its own header .h file and .cpp file for the separation of interface and implementation. As expected, you should follow all object-oriented programming principles.You will have 3 basic shape classes: Rectangle, Triangle, Circle. These classes are defined as explained in HW1. They should have appropriate constructors, setter/getter functions for their shape sizes and positions.You will also have ComposedShape class that has a container shape and inner small shapes. This class will hold two shape objects using composition in it. Many overloaded constructors for the class should have parameters for container shape and inner small shape with different types. This class should also have an optimalFit function that that fits inner small shapes into the container shape. The optimized small shapes will be kept in a vector of shapes, which should have a getter function.All of the above classes will have a draw member function that will take an ofstream object as parameter and it will draw the shape in that file using SVG format.You will also write a driver file that contains your main function. Your driver should make at least 4 objects of each class and should make array of objects of each class. Test each member function for each class. You should include the result SVG files from the draw functions in your submission.
CSE 241/505
[Solved] CSE 241/505 -HW2- Classes for shapes with own header
$25
File Name: CSE_241/505_-HW2-_Classes_for_shapes_with_own_header.zip
File Size: 489.84 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.