超越UML的实时行为研究
1. Tamagotchi系统介绍
Tamagotchi是一个有趣的电子宠物系统,它包含以下主要元素:
- Tamagotchi类 :具有多种状态和操作,如 state (枚举类型)、 arm_Timer(float) 、 cry() 、 die() 、 eat() 等。
- Person类 :有 get_off_table() 、 monitor_Tamagotchi() 、 set_at_table() 等操作。
- Timer类 :包含 count (浮点型)、 state (枚举类型),以及 arm_Timer(float) 、 decrement() 等操作。
下面是Tamagotchi系统的类和对象图的相关信息:
| 类名 | 属性 | 操作 |
| ---- | ---- | ---- |
| Tamagotchi | state: enum | arm_Timer(float), cry(), die(), eat()等 |
| Person | 无 | get_off_table(), monitor_Tamagotchi
超级会员免费看
订阅专栏 解锁全文
952

被折叠的 条评论
为什么被折叠?



