Soldier Payment Rules Solutions
During different service periods a soldier may have the following characteristics:
- Rank {private, corporal, sergeant, lieutenant, captain}
- Profession {fighter, driver, cook, officer}
- Service Type {active, reserve, retired}
- Unit {HQ, paratroopers, marines, infantry}
- Combat {yes, no}
Ranks must not overlap, while other characteristics may overlap during the same time periods.
Pay rate is determined by aggregating the amounts according to these rules:
- Base rate is $1/hr.
- Private $1/hr., corporal $2/hr., sergeant $3/hr., lieutenant $4/hr., captain $5/hr.
- Fighter $2/hr., driver $1/hr., cook $1/hr., officer $3/hr.
- Active $2/hr., Reserve $1/hr.
- HQ $1/hr., others $2/hr.
- Combat $5/hr., non-combat $0/hr.
Example:
- Rank: Private 1/1/2015-12/31/2015,
- Profession: Fighter 1/1/2015-6/30/2015, Cook 7/1/2015-12/1/2015
- Service Type: Active 1/1/2015-6/30/2015, Reserve 7/1/2015-12/1/2015
- Unit: HQ 1/1/2015-12/31/2015
- Combat: 4/1/2015-6/30/2015
On 6/1/2015 he was a private, a fighter, on active duty, at HQ, in combat, So, his pay rate was 1+1+2+2+1+5 = $12/hr
The challenge: assemble a single timeline for the soldier over a given service period that shows his/her hourly pay rate in any given time. Flag any conflicting dates (e.g. can’t be a sergeant and a lieutenant at the same time).
Additional challenge: What are all the different aggregated pay rates that apply and during which periods?
Send your solutions to DecisionManagementCommunity@gmail.com.
Solutions:
- Corticon – submitted by Michael Parish
- SQL – submitted by Dr. Bob Moore
- …
You must be logged in to post a comment.