Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS 2413 - Data Structures - Spring 2020 - Project Two Due: 11:59 PM, February 24, 2019 Description: This project is an extension of the

image text in transcribed

CS 2413 - Data Structures - Spring 2020 - Project Two Due: 11:59 PM, February 24, 2019 Description: This project is an extension of the previous project. Please change the name of the class Intervals to Segments when you submit project 2. Here are the requirements for project 2. 1. Template all classes. 2. Create these: a class Exception ; b. class LineSegmentException: Public Exception t}; c. class Segments Exception: Public Exception}; 3. Under these conditions throw exception. Catch and print a message as follows: T a throw a LineSegmentException when you ask for a midpoint of a line segment that has a length of 0. b. throw a SegmentsException when you are asked to remove a line segment that does not exists 4. Create an overloaded & aClosedPolygon(); //Bonus Method -20 Points 6. In the Segments class, create a method named findAllIntersects that returns a Segments object that contain line segments that intersects with the line segment that is passed as a parameter. Here is the method prototype: Segments
& findAllIntersects (LineSegment
&LS): 7. Write the destructor method for the Segments class. Here is the method prototype: CS 2413 - Data Structures - Spring 2020 - Project Two Due: 11:59 PM, February 24, 2019 Description: This project is an extension of the previous project. Please change the name of the class Intervals to Segments when you submit project 2. Here are the requirements for project 2. 1. Template all classes. 2. Create these: a class Exception ; b. class LineSegmentException: Public Exception t}; c. class Segments Exception: Public Exception}; 3. Under these conditions throw exception. Catch and print a message as follows: T a throw a LineSegmentException when you ask for a midpoint of a line segment that has a length of 0. b. throw a SegmentsException when you are asked to remove a line segment that does not exists 4. Create an overloaded & aClosedPolygon(); //Bonus Method -20 Points 6. In the Segments class, create a method named findAllIntersects that returns a Segments object that contain line segments that intersects with the line segment that is passed as a parameter. Here is the method prototype: Segments
& findAllIntersects (LineSegment
&LS): 7. Write the destructor method for the Segments class. Here is the method prototype

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Neo4j Data Modeling

Authors: Steve Hoberman ,David Fauth

1st Edition

1634621913, 978-1634621915

More Books

Students also viewed these Databases questions