Skip to content

Solution#3316

Open
ava15maha wants to merge 1 commit into
mate-academy:masterfrom
ava15maha:develop
Open

Solution#3316
ava15maha wants to merge 1 commit into
mate-academy:masterfrom
ava15maha:develop

Conversation

@ava15maha
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Rate AI review example

Comment thread src/figuresClasses.ts
public b: number,
public c: number,
) {
if (a <= 0 || b <= 0 || c <= 0) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding more detail to this error message. According to checklist item #3, include which sides are invalid and their actual values.

Comment thread src/figuresClasses.ts
const longest = Math.max(a, b, c);
const perimeter = a + b + c;

if (longest >= perimeter - longest) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants