Question 1: You'll need three classes: A parent class, a child class, and the driver program. Access the protected int variable in the parent class through a variable of the child class type in your driver program. Make sure the parent and the child classes are in different packages.
If it's possible to do it, then do it, and submit your code. If it's not possible to do it, then explain why/provide links.
Question 2: Let's say that you draw a square around the top right quadrant of a circle. If the circle has a radius r, then the square that covers the top right quadrant of the circle will cover an area r^2. The area of a circle is Pi*r^2. Given that we're dealing with only the top right quadrant, the area will be (Pi*r^2)/4. The ratio of the area of the top right quadrant of the circle to the square that covers it would be...?
Generate 4 billion random dots that fall within that square. Figure out how many of them fall within the circle, and how many fall outside of it. That ratio should be the same as what you computed in the last step. From there, you should be able to figure out what Pi is. Calculate and print this value. Btw, this is known as the monte carlo method.