You are doing nothing wrong, but you should always use 'prop()' instead of 'attr()' when you are dealing with such check & uncheck.
Please modified your code and use prop() in place of attr() for selecting all checkbox having class child.
$(".Child").find(":checkbox").prop("checked", true);
And do same for selecting and deselecting the Parent checkbox respectively.
$(".Parent").find(":checkbox").prop("checked", true);
$(".Parent").find(":checkbox").prop("checked", false);
hope this will help you.