我是一个完全的新手,因此我需要一些帮助。
如何创建带参数的uml类图和构造函数。
默认(无参数),您执行
policyholder()进行图表和伪代码
对于参数,您会做同样的事情
用于类图和伪代码的policyholder(策略编号,服务类别和客户年龄)。 / p>
它还要求将每个属性初始化为可实例化此类型对象的值,如果策略号不在1000和999之间(包括1000和999),则设置该策略号到0。(策略号是属性)
解决方案常见的方法是编写类似方法的构造函数,并简单地省略返回类型。
如果要特别清晰,可以添加<< constructor& gt;> 在前面。
I am a complete ROOKIE at this so I need some help on it.
How would you create uml class diagram and constructors with parameters.
for default (no parameters) you do
policyholder() for diagram and pseudo-code
for parameters would you do the same thing
policyholder (policynumber, service class, and customer age) for class diagrams and pseudo-code.
It also asked to initialize each attribute to value where an object of this type can be instantiated, If a policy number is not between 1000 and 999 inclusive, then set the policy number to 0. (policy number is attribute)
解决方案The common way is to write constructors like methods and simply omit the return type.
If you want to be extra clear, you can add <<constructor>> in front.
更多推荐
带参数的uml类关系图构造函数
发布评论