What I have done is create two Triangle constructors, one which will take string parameters (two many/few parameters) and one that will take integers and calls the validate method(calculate triangle <=0,>500,s1 > s2 +s3 ect).
I don't know if that's good practice(probably not?) but since the assignment is about writing my test cases first and then writing product code to make them pass I'm not too bothered so long as they pass, and they do. This is also why I throw a valid triangle exception so my test can pass for 3 valid parameters. Basically, my lecturer whats all my test cases to pass!
The very first problem I had when I started this
thread (non-integer exception) is now working 100% with the string split method so thanks for that.
I still have a problem, in calling the validate method in my integer constructor I seem to upset the sides I have initialized to calculate the area. Is there something I could do to make them work in harmony?
This is what my constructor looks like and the area and validation tests that get in each others way.
Oh and I limited it because I didn't want big ridiculous triangles.