开发者

Invalid scenario

开发者 https://www.devze.com 2023-01-23 12:10 出处:网络
Are we suppose to describe such scenario: Lets suppose that we have a fnc: void delete(int value); And now, am I suppose to descr开发者_运维问答ibe scenario when user supplies value of type not co

Are we suppose to describe such scenario:

Lets suppose that we have a fnc:

void delete(int value);  

And now, am I suppose to descr开发者_运维问答ibe scenario when user supplies value of type not convertible to int? It won't even compile, so what's the point?


I fail to see how this is about uml modeling, but anyway: the reason for this would be to show that if a value comes from somewhere not inside the compiled code (say a web page, a different application or something), the function will either not work, delete the wrong thing or return an error, depending on what is preferrable.

If this truly is about uml and modeling an application, the point of this exercise would probably be to show that you have given such a scenario thought and have a certain degree of control and error handling in your solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号