This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am trying to write the following formula in ternary format and any help and/or suggestions would be great.
I am using ternary because I am building a calculator and the plugin that I found will only work with ternary expressions. If you know how or have suggestions on how to make this calculator work differently, again that would be great.
So here is the basic idea...
If Resident = true then
percredite = 829
percredit = 1078
If credits < 6 then
total = credits * percredit
Elseif credits >6 and <15 then
total = 7500 * ((credits - 15) * percredit)
total = 7500
So if the user selects resident the percredit amount is 829 otherwise it is 1078.