Can I update multiple fields and calculate those fields based on fields in the parent module and child module?

Can I update multiple fields and calculate those fields based on fields in the parent module and child module?

Hi,

I have parent accounts in the Accounts module that have attendance percentages in % Filed A, % Field B, % Field C totaling 100. The children of each parent account are reservations that live in Custom Module and have a Total Attendance field and Attendance Field A, Attendance Field B, Attendance Field C as a number. Attendance Field A,B,C in each child account should be calculated based on the percentages of the parent account multiplied by the Total Attendance field in child account. The Attendance Field A,B,C results should round to full number no decimals. See example below.

Parent account:
% Field A = 10
% Field B = 50
% Field C = 40

Child account:
Total Attendance = 200
Attendance Field A = {% Field A * Total Attendance}  
Attendance Field B = {% Field B * Total Attendance}
Attendance Field C = {% Field C * Total Attendance}

I'd like to update those fields only when the Total Attendance record changes and my guess is that I first write the custom function and then create a Workflow Rule to run that function every time the Total Attendance record changes. 

Can anyone help me?