This week's book giveaway is in the Design and Architecture forum.We're giving away four copies of Communication Patterns: A Guide for Developers and Architects and have Jacqui Read on-line!See this thread for details.
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
• Ron McLeod
• Paul Clapham
• Devaka Cooray
• Liutauras Vilda
Sheriffs:
• Jeanne Boyarsky
• paul wheaton
• Henry Wong
Saloon Keepers:
• Stephan van Hulst
• Tim Holloway
• Tim Moores
• Carey Brown
• Mikalai Zaikin
Bartenders:
• Lou Hamers
• Piet Souris
• Frits Walraven

looking for a graphical representation

Ranch Hand
Posts: 255
• Number of slices to send:
Optional 'thank-you' note:
I am trying to think of a good way to represent graphically a logical framework.
Specifically, it's something like this:

Suppose you have some Strings A, B, C, D, E, F, and another String K which you want to evaluate.
You want to evaluate K like this:
K score is initially 0.
If K contains A or B, add 4 to the score.
If K contains C, add 10 to the score.
If K contains D, E, or F, add 5 to the score.

The program user wants to see a graphic representation of this logic.
I thought of two possible ways to represent this logic graphically.

One way is to put A through F on a table.
In the first row is the number 4, then A and B. In the second row is 10 and C, and in the third row is 5, D, E, and F.

Another way to represent this graphically is to put them in a JTree. The JTree has three nodes named '4', '10', and '5'.
The 4 node contains A and B, the 10 node contains C, and the 5 node contains D, E, and F.

Well, these are the two ways I thought of to represent the logic graphically. Any other ideas?

Ranch Hand
Posts: 1535
• Number of slices to send:
Optional 'thank-you' note:

Kevin Tysen
Ranch Hand
Posts: 255
• Number of slices to send:
Optional 'thank-you' note:
Wow, that is a nice program! Thank you. I'll take a close look at it and use some of the main ideas in the program.

 Politics is a circus designed to distract you from what is really going on. So is this tiny ad: We need your help - Coderanch server fundraiser https://coderanch.com/wiki/782867/Coderanch-server-fundraiser