• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

formula class diagram

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can I model formul with class diagram.
Example:
2a+b*c-4/e+f

Thanks
 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67671
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Elham Gh", please check your private messages for an important administrative matter.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Something must be done about this. Let's start by reading this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic