CodingBat is a website designed to give you practice writing methods to solve simple problems from just about anywhere (really, you can do this from your smartphone!).
abraskin@mbusd.org
in the "Share To" field and then click the "Share" button.P#_Last, First
where the # is replaced with the period you are in and your name is entered in comma separated last name first order.You are now ready to begin using CodingBat!
Name | Period 5 Link | Period 6 Link | Due Date |
---|---|---|---|
Problem Set 1 | problemset01 | problemset01 | Friday, October 10th, 2014 |
Problem Set 2 | problemset02 | problemset02 | Monday, October 20th, 2014 |
Problem Set 3 | problemset03 | problemset03 | Monday, October 27th, 2014 |
Chapter 1 Exam Rehab Exercises | chapter1exam | chapter1exam | Monday, November 3rd, 2014 |
Problem Set 4 | problemset04 | problemset04 | Monday, November 10th, 2014 |
Problem Set 5 | problemset05 | Monday, December 1st, 2014 | |
Problem Set 6 | problemset06 | Monday, December 8th, 2014 | |
Problem Set 7 | problemset07 | Monday, December 15th, 2014 | |
Problem Set 8 | problemset08 | Monday, January 5th, 2015 | |
Chapter 2 Exam Rehab Exercises | ch2_exam_strings | Monday, January 5th, 2015* | |
Problem Set #9 | problemset09 | Monday, January 12th, 2015 |
Some tips to make it clear you are not cheating!
public int max1020(int a, int b) { if (a>=10 && a<=20){ // a is in the range if (b>=10 && b<=20){ //a and b are both in range if (a>b){ return a; //a is the bigger of both }else { return b; //b is bigger } }else { //only a is in range return a; } } return 0; // In all other case, return 0! }
public boolean sleepIn(boolean weekday, boolean vacation) { if(!weekday || vacation){ return true; } else { return false; } }Write:
public boolean sleepIn(boolean weekday, boolean vacation) { if(!weekday || vacation){ return true; } return false; }