Introduction to Computer Programming Dr. Jennifer Glenn, Spring 17 Assignment #4 Due during the Week of April 3rd 8th, 2017 (Beginning of Labs) Assignment objectives: I. Understand Nested For loops and Nested If Statements. 2. Understand Arrays. 3. Use VBA String Functions. Task write a VBA sub program to verify whether a point (with x and y coordinates) lies within a specified irregular polygon. Here is the basic principle and process that you need to understand to classify whether a point lies within the irregular polygon or not. 1. 1. The irregular polygon that you consider must be described by a series of coordinates connected by straight lines. In the example illustrated in the figure below, an irregular polygon is drawn considering the following set of points X Co-ordinate Y Co-ordinate 28 27 28 30.5 30.5 (Note: As seen from the figure below, each consecutive pair of coordinates form a line on the chart.) 2 It is essential the polygon is a closed area for the procedure to work properly. Ohis condition has to be in the Make sure the points declared in such a way that the lines connecting two adjacent points do not ntersec Hints: 1. Area is enclosed if the last point and first point are equal. 2. If the polygon considered has eight edges, there will be 9 points that user hasto provide as input. Define the number of edges for irregular polygon first and then use this input further in the program 2. Principle: The standard method to determine whether a point lies inside or outside the figure is to draw ray" from the point extending out to infinity. If the ray crosses the boundary line(s) of the figure an odd number of times, the point lies inside the figure. In the example illustrated in the figure below, when a "ray" is drawn vertically upwards from the orange point, the ray crosses the boundary lines an odd number of times while the ray drawn from the grey point crosses the boundary lines an even number of A general algorithm (procedure/pseudo code) to test whether a point xA,yA lies within the figure is as For each N edges that make up the figure: hen go to the next edge