CS 2510                                                         Assignment 3                                                   Dr. Woelfl

 

 

The purpose of this assignment is to write a C++ program which will produce a text graph of data given in polar form.  This program will use the Point class developed in lab 4.

 

Using the program written in class and working in teams of 2 or 3, make the following revisions:

 

 

 

 

                      void dataIn(Point*, int& number_points); 

 

 

                void scale(Point*, int number_of_points); 

 

                Example values for scaling are shown in the table:

 

Original x y values

Shifted Origin

Scaled

-5  5

0  15

0.00  0.75

5  10

10  20

0.50  1.00

0 -10

5   0

0.25  0.00

 

 

 

 

      Data, Get External Data, Import Text File, for  delimiters, check space and check treat consecutive delimiters as one

 

If the file was formatted properly, your data will appear in two columns of the spreadsheet.  Simply highlight all the data and choose a chart of type x-y (Scatter) no lines, only markers.  The first column, which should be x values, will be used for the x axis.  Label and format the graph for black and white copying (no colors!). 

 

Create a test input data file having data in polar form: magnitude, angle in degrees, and character and use it to develop your program.  Actual files for the assignment will be on the website soon.  A copy of your source code and two plots are due on Friday of week seven.