Visual Basic does well in this area。 When Visual Basic invokes a method, it can pass standard data types, user-defined data types, and a flexible data type called variant。 Methods are implemented with subroutines or functions。 One limitation of functions is that they can not return a user defined data type。

Visual Basic provides the capability of defining methods (functions and subroutines) as private。 As in C + + , this prevents any other objects from invoking these methods。  Data can also be hidden from other objects。 However, with user defined data types only their data can be hidden, and not the type itself。

Modularity: The concepts of coupling and cohesion apply as well to object-oriented programming as they do to procedure- oriented programming [Myers 78]。 Booch says "Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules" [Booch 94]。

Visual Basic does as well here as any of the OOP languages。 In fact, it does better than Smalltalk, where the class defines the only level of modularity [Booch 94] 。 Methods can be easily grouped together into  objects。

According to Booch, there is a tension between coupling and inheritance [Booch 94]。 Since Visual Basic does not support inheritance, it lends itself to weak coupling, which is good。

One notable nuisance relating to coupling is that when any change is made to a module, every projeci that includes that module must be recompiled。

Hierarchy: This refers to  the  ability  to organize abstractions into a hierarchy。 Booch claims that a set of real world abstractions  often defines  a hierarchy。  He defines hierarchy  as a ranking or ordering of abstractions。 Classes are used to define abstractions。 Inheritance defines the relationship  that classes have with one another,  usually  a hierarchy。

For example, a class in the banking industry might be Bank Account。 The methods associated with Bank Account may be Withdraw and Deposit。  Other classes might include Checking

Account and Savings Account。 These are more specific abstractions of Bank Account, therefore Checking Account and Savings Account are children of Bank Account。

When a method is needed at runtime, the associated class is searched for the method。 If it is not found, the parent is then searched。 In this way, the Checking Account only has to have methods that are unique to checking。

This is the element that precludes Visual Basic from being a true object-oriented language。 Visual Basic does not have classes or inheritance。 Although it has objects, the objects are not hierarchical in this way。

Now we will consider the minor elements of Booch’s   model。

Typing: Although Booch acknowledges that the concept of type and class are technically distinct, he uses the two concepts interchangeably in this context。 By typing, he is referring more to abstract data types than traditional data typing。 According to Booch, typing is the enforcement of the class of an object, such that objects of different types may not be interchanged, or at the most, they may be interchanged only in very restricted ways。 In other words, when you declare a variable, function, or user defined data-type, you must specify a type。

Visual Basic can be either strongly typed or weakly typed, depending on the use of the variant data-type。 If you don’t use the variant data-type, Visual Basic is strongly typed。 A variant is a special data type that can contain numeric, string, and date information。 Variant is the default data type if none is specified。

Concurrency: In a running object-oriented application, each object that represents a "live" thread of control is called active。 Concurrency is the property that distinguishes an active object from one that is not active [Booch 94)。 Visual Basic is concurrent。 For example, the Absence Tracking System (see Section IV) uses a timer routine to update the displayed time and date every 60 seconds。

上一篇:船舶系泊定位系统英文文献和中文翻译
下一篇:电液系统的输出反馈非线性控制英文文献和中文翻译

数控机床制造过程的碳排...

新的数控车床加工机制英文文献和中文翻译

抗震性能的无粘结后张法...

锈蚀钢筋的力学性能英文文献和中文翻译

未加筋的低屈服点钢板剪...

汽车内燃机连杆载荷和应...

审计的优化管理英文文献和中文翻译

新課改下小學语文洧效阅...

互联网教育”变革路径研究进展【7972字】

我国风险投资的发展现状问题及对策分析

网络语言“XX体”研究

张洁小说《无字》中的女性意识

LiMn1-xFexPO4正极材料合成及充放电性能研究

安康汉江网讯

麦秸秆还田和沼液灌溉对...

老年2型糖尿病患者运动疗...

ASP.net+sqlserver企业设备管理系统设计与开发