3) public String baseballOuts(){
String msg = "";
int totalOuts = 0;
// Write a set of nested for-loops that willdetermine the number of
// outs in a regulation baseball game. Assume: 9 innings per game,
// 2 halves per inning, 3 outs per half inning.
// You solution should include a loop (outer or nested) for each
// of the assumptions.
// TODO: ADD LOOP CODE HERE
msg = "Total number of outs in a regulation baseball game is " + totalOuts + ".";
return msg;
}

4)public String factorial (int n){
String msg = "";
int factnum = 1;
// Use a loop to calculate the factorial of an input integer.
// Note: If the input integer is too high an error may occur even if your
// logic is correct. Why? At what value of input does the error occur?
// How can you adjust the method so that either the error does not occur
// or the method "fails gracefully?" Write your answers in the form of
// a comment here.
// TODO: ADD LOOP CODE HERE
msg = n + "! = " + factnum;
return msg;
}

These are decent tutorials which should help you to understand all you need to know for this assignment. If you're still stuck after studying these, then please come back with any specific questions you may have. Much luck!