aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes formula class diagram Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "formula class diagram" Watch "formula class diagram" New topic
Author

formula class diagram

Elham Ghaf
Greenhorn

Joined: Dec 14, 2008
Posts: 6
How can I model formul with class diagram.
Example:
2a+b*c-4/e+f

Thanks
Nachiket Patel
Ranch Hand

Joined: Sep 16, 2007
Posts: 110
Hello Elham,
I am not getting your question??
Do you want to write a program, which can execute formula??

Cheers,
Nachiket
[ December 15, 2008: Message edited by: Nachiket Patel ]

Before software can be reusable, it first has to be usable. - Ralph Johnson
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Elham Gh:
How can I model formul with class diagram.
Example:
2a+b*c-4/e+f


What for?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Elham Ghaf
Greenhorn

Joined: Dec 14, 2008
Posts: 6
My application must have features for getting formula from users, validate it and calculate it.
These formulas use in HRM syetem.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61768
    
  67

"Elham Gh", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Elham Gh:
My application must have features for getting formula from users, validate it and calculate it.
These formulas use in HRM syetem.


Yes, but what do you need the class diagram for?
Elham Ghaf
Greenhorn

Joined: Dec 14, 2008
Posts: 6
Originally posted by Ilja Preuss:


Yes, but what do you need the class diagram for?


Then if I dont make class diagram, how can I model it and give it to programmer?
[ December 22, 2008: Message edited by: Elham Ghaf ]
Elham Ghaf
Greenhorn

Joined: Dec 14, 2008
Posts: 6
Originally posted by Bear Bibeault:
"Elham Gh", please check your private messages for an important administrative matter.



What is my problem?!!
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Elham Ghaf:

Then if I dont make class diagram, how can I model it and give it to programmer?


So your intent is to communicate to a programmer what he should program? I assume you are a designer, then? Or a business analyst? Or?
Alan Mehio
Ranch Hand

Joined: Apr 04, 2005
Posts: 73
Hi,

My application must have features for getting formula from users, validate it and calculate it.
These formulas use in HRM syetem.



So you mentioned above is functional requirement so there is a class which is which deals with the user to recieve formula and there is another class which validate the formula and there is another class which calcualte the formula.

You should build your structure diagram ( class diagram) based on your functional definiton and establish the association between these classes. Then think about what patterns do you have in your OO design. I can see visitor pattern for validation of the formula. And a factory pattern for producing different class implementation for different formula or ??


Regards,
Alan Mehio
London,UK


Regards,
Alan Mehio
London, UK
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: formula class diagram