Question: JAVA & a little bit of SQL We have 3 people - First Person, 29y.o; Second Person, 20y.o.; Third Person, 35 y.o. Create void method

JAVA & a little bit of SQL

We have 3 people - First Person, 29y.o; Second Person, 20y.o.; Third Person, 35 y.o.

Create void method called calculate with no input parameters There are many ways to accomplish our goal, but please follow the pseudo code provided: - Query all Account objects and put them in a List - Use the List size function to get how many account we have - Loop the Accounts List to find the sum of all Age fields - Calculate the average Age - Loop the Accounts List and fill the Average_Age__c field

Basically, with the information provided about the people, I need to put them in a list and then follow the steps. I just need to see the syntax and the approach. :)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!