Project 8

Writeup:

This week, our task was to use classes to organize data, and then to plot the data from the file that we downloaded (testdata.txt). We were also able to download skeletons for our Datum and Data collection skeletons to provide a framework for our code. The functions and the structures of methods, along with some comments, were provided, but we had to go through and define those methods so that the functions and classes could function properly.

Here's a couple images from my Datum class:

Here's my Data collection image:

In order to create fields in an object, we used the set method to assign a field to the method's parameters. For example:

By setting this variable self.x equal to tx, for instance, we provide a reference to the object itself. Accessing the fields was fairly simple. The methods X, Y, and Z, all with the parameter 'self' return the fields self.x, self.y, and self.z, respectively, thus accessing those fields. Here's the code: