[SOLVED] 24-780B—ENGINEERING COMPUTATION Assignment7

35.00 $

Category: Tags: , , , ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Assignment7-icrtrc.zip (372.6 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (2 votes)

Write a member function for Shape class that take a coordinate point as input (or x and y values) and determines if that point is inside the shape. The function declaration should look a lot like this: bool isContained(Point2D testPnt, bool isInclusive = true); bool isContained(float testX, float testY, bool isInclusive = true);

As part of testing your function, add something into ShapeManager class so that when you are in Edit Mode, something happens (a sound, a color change, etc.) when you right-click inside the current shape. In the code I am sharing, this part is already implemented as a “ding” when the right-click is in the shape and “buzzer” when it is out. If you go your own route, you can do whatever seems right.
We will discuss the algorithm (ray casting) in lecture.
Deliverables
6 files (zipped together):
ShapeManager.h and ShapeManager.cpp
Shape2D.h and Shape2D.cpp
Line2D.h and Line2D.cpp (no change, probably)

Learning Objectives
Use of classes and objects in C++.
Implementing algorithms developed by others.
Adapting code written by others.

  • Assignment7-icrtrc.zip