To construct the missing parts of the two-way table, we need to fill in the numbers for the 7th graders who cannot swim and the 8th graders who can swim.
For the 7th graders who cannot swim, we can calculate the missing value by subtracting the number of 7th graders who can swim (a) from the total number of 7th graders. So, the missing value for 7th graders who cannot swim would be 65 - a.
For the 8th graders who can swim, we can calculate the missing value by subtracting the number of 8th graders who cannot swim from the total number of 8th graders. So, the missing value for 8th graders who can swim would be 45 - a.
Now we can construct the missing parts of the two-way table:
Can Swim Cannot Swim Totals
7th Graders a (65 - a) 60
8th Graders (45 - a) a 45
Totals 65 40 105