Web Hosting Tomcat, Java, JSP, Servlets, J2EE, PHP, MySQL

Cheap web hosting provider

05
Jan

Object-Oriented Design with UML and Java The operation

Object-Oriented Design with UML and Java The operation that performs a debit transaction on a bank account object changes the current balance it holds. This category of operation is described as a transformer operation. A transformer operation changes one or more of the object instance attribute values. Both operations refer to the values of the object s attributes, collectively the state of the object. Transformer operations result in a state change, while enquiry operations do not usually affect the state of the instance. In the class diagram of figure 1.5 we recognize the operation getBalance as an enquiry operation, while debit and credit are transformer operations. Account Attributes theNumber theBalance Operations debit credit getBalance Figure 1.5 Class diagram with Account class 1.2.2 Objects make excellent software modules The concept of an object is both simple and yet extremely powerful. Objects make ideal software modules. Each object instance forms a self-contained entity. Everything an object knows is expressed in terms of its attributes and everything it can perform is expressed by its list of operations. For this reason, objects are described as highly cohesive. All the characteristics of an object provide some well-bounded behaviour for the particular abstraction they represent (encapsulation). Consider a motor car. A car has various controls that are used to control and operate it. The gear shift, for example, is used to change gear on a manually operated vehicle or to select the drive on one that is an automatic. Cars usually have tachometers to show the speed of the vehicle. Other controls include the accelerator and the brake. The internal components of the car are implemented by the many mechanical and electronic devices contained within the body of the car (usually under the engine bonnet). This metal carcass isolates the driver from the internals. Since the driver has no direct contact with these components there is no likelihood that he will damage himself or the car. Consider the position where, instead of an accelerator pedal, the driver controls the speed by using a screwdriver on some internal control screw. The accelerator would usually have some restricted amount of movement, limiting the driver to a certain maximum speed. Without this restriction it is possible that adjustments made directly to the control screw may set the speed above its maximum safe working level and consequently damage vital components.

If you looking for unlimited one inclusive web hosting plan please check unlimited web hosting website.

Comments are closed.

Home | About Us | Compare Plans | Standard Hosting | Business Hosting | Java Tomcat Hosting | Support | FAQ | Order Now!

Powered by Omnicus java hosting services. All rights reserved.
Entries (RSS) and Comments (RSS).