We only have one output in our MIS template. We will need to discuss whether to use the multiassignment statement, or introduce a tuple type. We can discuss in our meeting later today (Jan 26, 2018).
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related or that one is blocking others.
Learn more.
I was working on that. I made some changes. I used AB, AC, BC as class variables and I used P as a local variable. Moreover, I defined a LINE exception for the three points which are on the same line.
Okay. When you are done, please assig your work for review to @jiangz26. Given how close we are to the tutorials, could you also please assig @madejh, @palmes4 and @staplejw as reviewers. Hopefully someone will have time to check your syntax etc.
Slide 4 says "Not in language of implementation, but uses mathematical and application language", maybe the language here could be more specific regarding what exactly the "application language", or use a more descriptive term like "but uses mathematical language and language specific to the problem domain."
"Considering we have three points in a 2D surface and we want to know the possibility of having a triangle with the three points and then calculate the perimeter and the area of the triangle."
Can you give examples of 3 points not forming a triangle in cartesian space? Shouldn't this be 3 sides? Even in the degenerate case you have a triangle of zero area, that is a line.
"AB + AC < BC, AC + BC < AB, AB + BC < AC
We are calculating the perimeter of the triangle using the following
formula:
"
what AB AC BC are never explicitly stated on slide 8.
slide 16, routine names have spaces in them, if we are requiring students to match MIS exactly, the method names should be names they can produce in a programming language, IE camel case, snake case.
Not sure what the comma's are doing in this statement? There is a mix of boolean and real arithmetic.
All the exceptions listed in the MIS seem to have incorrect bracketing:
"(self.a.xcoord()==self.b.xcoord() ==self.c.xcoord() or self.a.ycoord()==self.b.ycoord() ==self.c.ycoord()) ⇒ LINE)" seems to be missing a left bracket?
@madejh
According to the triangle definition they should not be in the same line, thus we can not have triangle with area= 0. You can find it on Wikipedia.
You can see AB,AC,BC in the figure on slide 7. Moreover, in the next slides you can see what AB,AC and BC is. If you think it is necessary to write a description about them I can write.
About the names on slide 16, you are right, I will change that and also about slide 19. It was my mistake using latex.
One bracket is missing.
I've made a few changes to the T4 slides as follows:
Slide 4, following advice from @madejh, the bullet point is now "Not in language of implementation, uses mathematical language"
Slide 4, changed "Internal implementations are not included in a MIS" to "Implementation details are not included in the MIS"
The interface for the PointADT module had to be changed because it is an ADT, not an abstract object
The interface for the TriangleADT module had to be changed because it is an ADT, not an abstract object
The constructor for triangles has the state variables and the arguments reversed
sides() doesn't make any sense as written. It causes a state transition, but not one that a programmer would expect. The information in the state variables AB, AC etc is redundant. The slides have been changed to have sides return a sequence of reals, where each real corresponds to the length of one side.
The changes to the slides are made in commit d4f5838d.