Alright, so here is the background. I have different shapes classes (Circle, Rectangle, Triangle) and I am trying to make a driver program that reads a .txt file and takes the input and creates the shapes based on the input.
One double = circle(radius)
Two doubles = rectangle(width, length)
Three doubles = Triangle(sideA, sideB, sideC)
Everything works fine except when there is invalid input for a triangle. When there is invalid input such as 10 2 3, it throws an exception and then stops reading the file. I want it to catch the exception and then continue on through the file
*** MOD EDIT: REMOVED CODE ***
So... How would I modify the driver so that it handles the exception from triangle class but then continues to read through the file?
One double = circle(radius)
Two doubles = rectangle(width, length)
Three doubles = Triangle(sideA, sideB, sideC)
Everything works fine except when there is invalid input for a triangle. When there is invalid input such as 10 2 3, it throws an exception and then stops reading the file. I want it to catch the exception and then continue on through the file
*** MOD EDIT: REMOVED CODE ***
So... How would I modify the driver so that it handles the exception from triangle class but then continues to read through the file?