作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2010, Vol. 36 ›› Issue (15): 72-73,76. doi: 10.3969/j.issn.1000-3428.2010.15.025

• 软件技术与数据库 • 上一篇    下一篇

基于Java的对象模型消息机制实现

石博天1,高玉金2,朱 凯1   

  1. (1. 北京市八一中学,北京 100080;2. 北京理工大学计算机学院,北京 100081)
  • 出版日期:2010-08-05 发布日期:2010-08-25
  • 作者简介:石博天(1991-),男,高中生,主研方向:计算机辅助教学,LEGO多机器人系统;高玉金,讲师、博士;朱 凯,中学 一级教师

Implementation of Message Mechanism for Object Model Based on Java

SHI Bo-tian1, GAO Yu-jin2, ZHU Kai1   

  1. (1. Beijing Bayi High School, Beijing 100080; 2. School of Computer Science and Technology, Beijing Institute of Technology, Beijing 100081)

  • Online:2010-08-05 Published:2010-08-25

摘要: Java语言标准不提供消息,使得面向对象模型中消息机制的实现十分不便。针对上述问题,利用Java的接口、继承及多态机制,实现一种风格与微软基础类库中framework的消息机制相似的对象模型消息机制,将其应用于一款基于LEGO机器人的协同式智能化多机器人系统,结果证明该消息机制具有合理性、有效性和易实现性。

关键词: Java语言, 消息, 面向对象, LEGO机器人

Abstract: Java language standard does not provide any message, which makes message mechanism in object-oriented model hard to implement. This paper uses interface, inheritance and polymorphism of Java to implement a message mechanism for object model, which is similar to that of framework in Microsoft Foundation Class(MFC). The mechanism is applied in a collaborative intelligent multi-robot system based on LEGO robot, and the result proves it is reasonable, effective and easy to implement.

Key words: Java language, message, object-oriented, LEGO robot

中图分类号: