-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upload #41
base: main
Are you sure you want to change the base?
upload #41
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Szép munka
} | ||
|
||
|
||
public Polinom Clone() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ez egy DeepClone implementáció, amit jó lenne ha a metódus neve jelezne.
{ | ||
while (Numbers.Count > 0 && Numbers[0] == 0) | ||
{ | ||
Numbers.RemoveAt(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lista elejéről törlés piszok költséges. Stack esetleg? vagy Láncolt lista a sima lista helyett?
{ | ||
if (obj is Polinom other) | ||
{ | ||
RemoveLeadingZeros(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Öö :D Az Equals módosítja az objektum belső állapotát a RemoveLeadingZeros() hívással?? Ennek nem így kellene működnie. Ha a RemoveLeadingZeros() szükséges, akkor azt miért nem a létrehozáskor hívod? Az Equals hívásnak NEM szabad módosítania belső állapotot. Ez nagyon durva Single responsibility és Liskov elv sértés is.
{ | ||
expression = Regex.Replace(expression, @"\s*([+\-*/%,()])\s*", "$1"); | ||
|
||
if (polynomials.ContainsKey(expression)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ezt bőven szét lehetetett volna szedni egy külön osztályra.
No description provided.