Solution#3316
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved. All task requirements are met, including the Figure interface, three shape classes with proper area calculations, correct error handling for invalid inputs, and the getInfo utility function. The code style checklist items are satisfied, and error messages meet the required descriptive standard. The suggestions in the file comments about adding more detail to error messages are noted as potential improvements, but since the current error messages already fulfill the checklist requirements, they don't block approval. The implementation is complete and functional.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| public b: number, | ||
| public c: number, | ||
| ) { | ||
| if (a <= 0 || b <= 0 || c <= 0) { |
There was a problem hiding this comment.
Consider adding more detail to this error message. According to checklist item #3, include which sides are invalid and their actual values.
| const longest = Math.max(a, b, c); | ||
| const perimeter = a + b + c; | ||
|
|
||
| if (longest >= perimeter - longest) { |
There was a problem hiding this comment.
Consider making this error message more descriptive by mentioning the triangle inequality rule that was violated, e.g., include the actual side lengths that failed validation.
No description provided.