reset password
Author Message
rkmx52
Posts: 23
Posted 12:07 Jan 16, 2016 |

Is the constructor going to create 2 instance variables, one for the shape tuple and one for the list (passed by parameter)?

Or is it simply going to create 1 instance variable for the shape tuple with the list (passed by parameter) inside it?

I don't really understand the significance of the shape (or rather, tuple) here, since this whole assignment seems to work with just lists.

 

Thanks.

msargent
Posts: 519
Posted 12:27 Jan 16, 2016 |

Is the constructor going to create 2 instance variables, one for the shape tuple and one for the list (passed by parameter)?

Yes. The shape instance variable is to compare it with the shape of matrices passed into the methods to see if they are compatible. You could just get it from the list itself, but to practice making instance variables I put that in.