This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

formula class diagram

 
Elham Ghaf
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I model formul with class diagram.
Example:
2a+b*c-4/e+f

Thanks
 
Nachiket Patel
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Elham Gh:
How can I model formul with class diagram.
Example:
2a+b*c-4/e+f


What for?
 
Elham Ghaf
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64699
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Elham Gh", please check your private messages for an important administrative matter.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic