信息与电脑2024,Vol.36Issue(2) :115-118.

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

Experimental Research on the Encapsulation of OOP in Java

陶静
信息与电脑2024,Vol.36Issue(2) :115-118.

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

Experimental Research on the Encapsulation of OOP in Java

陶静1
扫码查看

作者信息

  • 1. 上海商业会计学校,上海 200011
  • 折叠

摘要

文章分析了面向对象编程(Object Oriented Programming,OOP)的封装性在Java中的具体应用,并进行了试验分析.试验结果表明,将OOP中的属性和方法用数据库的实体关系图(Entity Relationship Diagram,ERD)表示出来,再用Java封装就能很好地表示抽象的OOP封装性,通过用Java进行验证得出了实体名即Java的类名、属性名即实例变量名、insert语句即输入方法、select语句即输出方法、关系即处理方法的编程公式,程序运行结果与该公式完全一致.

Abstract

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.

关键词

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

Key words

Object Oriented Programming(OOP)/encapsulation/Java/test

引用本文复制引用

基金项目

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

出版年

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

信息与电脑

影响因子:1.143
ISSN:1003-9767
参考文献量5
段落导航相关论文