I am trying to write a function but I am a beginner in JAVA. I would like to pass into the method a Value Object.
Section Count Expectation Status
A 11 12 1
B 5 5 0
C 21 20 -1
D 7 6 -1
E 18 17 -1
A 12 12 0
B 22 22 0
C 10 11 1
D 2 2 0
E 12 11 - 1
Write a method whose input parameters is a Value Object
I want to only adjust count values of Section A or C.
If there A status > 0 then
if C count > expectation
add C excess to A count
if C status > 0 then
if E count > expectation
add E excess to C count
I only want to process under these conditions
How do I loop through the ValueObject and how do I do a lookup
for the specific section (i.e. Section A or C or E).
Public string AddjustVal(DepartVO)
If section = A and status > 0 then
// I need to find section C - how do I do this?
If section C count > expectation then
Add the excess to section count
If section C status > 0 then
// Find section E
If section E count > expectation
Add excess to Section C