An ellipse is a curve in a plane surrounding two focal points such
Ask Expert

Be Prepared For The Toughest Questions

Practice Problems

An ellipse is a curve in a plane surrounding two focal points such

Overlapping Ellipses

An ellipse is a curve in a plane surrounding two focal points such that the sum of the distances to the two focal points is constant for every point on the curve. - Wikipedia.


In this assignment you will use a Monte Carlo Simulation to estimate the overlap between two Ellipses.

Part 1: Ellipse Class

A. Write a class to capture the necessary information of an ellipse.

B. Write code to thoroughly test your implementation of the ellipse class including:

a. A constructor that accepts no variables.

b. A constructor that accepts all appropriate variables.

c. Setting and getting the appropriate variables.

d. A function that returns the area of the ellipse

e. A function that returns the circumference of the ellipse.

Part 2: Structure Chart

Using the top-down strategy discussed in class, produce a structure chart to capture the necessary steps for computing the overlap of two ellipses using the Monte Carlo Technique.

A. Each block of the chart should capture the requirements of a function.

B. Label each edge with the input and output of the function, similar to the examples given in class.

NOTE: DO NOT ATTEMPT TO IMPLEMENT YOUR SOLUTION UNTIL YOU THOROUGHLY UNDERSTAND THE PROBLEM AND HAVE MAPPED OUT YOUR SOLUTION.

Part 3: Implementation

Implement your solution described by your structure chart. Your function should accept two Ellipse objects (defined in part 1) and return the area of their overlap. Use a Monte Carlo simulation to estimate the overlap. If they do not overlap, return 0.

Part 4: Unit Testing

For this part, you will thoroughly test your implementation. For EVERY function, beginning with the lowest level functions:

A. Print the name of the function.

B. Print the doctstring of the function.

C. Print the rationale for the test (e.g. "Testing when a point falls within an Ellipse.")

D. Print the specific input used to evaluate that rationale.

E. Print the result.

F. Repeat C-E until all relevant cases are tested for that function.

Hint
Business An ellipse is a smooth curve surrounding two focal points, such that for all points on the curve, the summation of the two distances to the focal points is a constant. As such, it simplifies a circle, which is the special type of ellipse in which the two focal points are similar....

Know the process

Students succeed in their courses by connecting and communicating with
an expert until they receive help on their questions

1
img

Submit Question

Post project within your desired price and deadline.

2
img

Tutor Is Assigned

A quality expert with the ability to solve your project will be assigned.

3
img

Receive Help

Check order history for updates. An email as a notification will be sent.

img
Unable to find what you’re looking for?

Consult our trusted tutors.

Developed by Versioning Solutions.