首页|OOP的封装性在Java中的试验研究

OOP的封装性在Java中的试验研究

扫码查看
文章分析了面向对象编程(Object Oriented Programming,OOP)的封装性在Java中的具体应用,并进行了试验分析.试验结果表明,将OOP中的属性和方法用数据库的实体关系图(Entity Relationship Diagram,ERD)表示出来,再用Java封装就能很好地表示抽象的OOP封装性,通过用Java进行验证得出了实体名即Java的类名、属性名即实例变量名、insert语句即输入方法、select语句即输出方法、关系即处理方法的编程公式,程序运行结果与该公式完全一致.
Experimental Research on the Encapsulation of OOP in Java
The article analyzes the specific application of encapsulation in Object Oriented Programming(OOP)in Java and conducts experimental analysis.The experimental results show that the properties and methods in OOP can be represented using the Entity Relationship Diagram(ERD)model of the database,and the abstract OOP encapsulation can be well represented using Java encapsulation.Through verification using Java,the programming formulas for entity name as Java class name,attribute name as instance variable name,insert statement as input method,select statement as output method,and relation as processing method are obtained.The program running results are completely consistent with the formulas.

Object Oriented Programming(OOP)encapsulationJavatest

陶静

展开 >

上海商业会计学校,上海 200011

面向对象编程(OOP) 封装性 Java 试验

全国高等院校计算机基础教育研究会计算机基础教育教学研究项目(2023)

2023-AFCEC-056

2024

信息与电脑
北京电子控股有限责任公司

信息与电脑

影响因子:1.143
ISSN:1003-9767
年,卷(期):2024.36(2)
  • 5