Financial Transaction: Java Data Type #1

Best data type for Financial Transactions: Object with two integer type variables. One for the dollars and another for the cents.

floating points are inappropriate as they suffer from round-off errors.

For financial software how to create a common class for contracts that multiple independent classes will satisfy?

Using interface

because

for independent class hierarchies

An interface is the only type that permits multiple class implementations

an abstract class cannot be the superclass of multiple class implementations

a concrete class cannot be the superclass of multiple class implementations

Inheritance in the Java programming language

A superclass may have multiple subclasses.
A class can not inherit from multiple superclasses.
An abstract class may only have one superclass.
Interfaces, unlike classes, may have any number of supertypes.
Any class may only have one superclass.

Relationship navigation in java

There are no restrictions on directionality for relationships of any multiplicity
Compositions as well as associations may also have navigation methods
An association makes no restrictions on the client to have access to the actual related objects
Bidirectional navigation is permitted.
For details about java persistence, relationship, navigation, please check: http://java.sun.com/javaee/5/docs/tutorial/doc/bnbpz.html

From: http://sitestree.com/?p=4797
Categories:1
Tags:
Post Data:2011-02-27 13:16:48

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

Leave a Reply