用JAVA代码实现说明以下十个概念定义,希望大家大显身手呀!!!

至尊宝2021 2004-04-07 02:11:20
敝人的家庭作业,就是用代码举例说明以下十个概念问题.
The Ten Big Definitions
• Object - A software package
• Method - An objects procedure
• Message- A signal from one object to another
• Class - A template to create objects
• Subclass- A special case of a class
• Instance - An objects other name
• Inheritance - A mechanism to use another objects innards
• Encapsulation- Data & methods Together
• Abstraction - Capturing behaviors & characteristics
• Polymorphism- Hiding alternative methods behind a
common interface

请各位多多支持呀,期待...
...全文
46 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
programer23 2004-04-08
  • 打赏
  • 举报
回复
thinking 一下
至尊宝2021 2004-04-08
  • 打赏
  • 举报
回复
而以下的代码可以实现:
• Abstraction - Capturing behaviors & characteristics
• Polymorphism- Hiding alternative methods behind a
common interface
public class Box{
public Box(){}
public void draw(){
System.out.println("Create Shape");
}
}
public class CircleBox extends Box{
public CircleBox(){}
public void draw(){
System.out.println("Create Circlebox");
}
}
public class test{
public void test(){}
public void create( Box box ){
box.draw();
}
public static void main( String[] args){
CircleBox circlebox = new CircleBox();
create( circlebox );
}
}
请大家指点指点,谢谢先!!!
至尊宝2021 2004-04-08
  • 打赏
  • 举报
回复
补上:
• Object - A software package
• Method - An objects procedure
• Message- A signal from one object to another
• Class - A template to create objects
• Subclass- A special case of a class
• Instance - An objects other name
• Inheritance - A mechanism to use another objects innards
• Encapsulation- Data & methods Together
至尊宝2021 2004-04-08
  • 打赏
  • 举报
回复
public class Text {
private String content;
public Text() {}
}
public interface Shape {
public void Draw();
}
public class TextShapeClass extends Text implements Shape {
public TextShapeClass() {
}
public void Draw() { }
}
以上的类可以实现以下的概念诠释吧
请大家多多指教!!!
yyfhz 2004-04-07
  • 打赏
  • 举报
回复
如果能把你的解答先贴上来,自然会有人帮你的
至尊宝2021 2004-04-07
  • 打赏
  • 举报
回复
各位,劳驾了,只是我想要参照下各位的解答,怕自己的不够全面。
还请各位仁兄顶顶
bluesage 2004-04-07
  • 打赏
  • 举报
回复
谁出的题?
iwhp 2004-04-07
  • 打赏
  • 举报
回复
thinging
freelyl 2004-04-07
  • 打赏
  • 举报
回复
作业算我不帮忙。本来就是自己想的东西。

50,530

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧