Courses‎ > ‎AP Computer Science‎ > ‎Konstantinovich‎ > ‎

2018-09-18

posted Sep 18, 2018, 6:13 AM by Konstantinovich Samuel   [ updated Sep 18, 2018, 10:22 AM ]

There is going to be an interest meeting for the google mentorship program this friday at 4pm in room 307.

Do Now: 
Share your coding bat work with me if you did it in class (or didn't do it at all), then complete Logic-1   ->  in1To10



Did you use an if statement? If you did, try again without an if statement. Just return the boolean.
DO NOT do this:
if( boolean ){
 return true;
}
else{
 return false;
}


INSTEAD you SHOULD do this:
return boolean;



Classwork:


Too often, students type without thinking. You don't solve the problem on the computer, just like you don't start building any complicated structure without plans. If you do, it may work sometimes, but when it doesnt work, it will take you MUCH longer to try to fix.


Lets make some bricks by solving a problem with your neighbors:
DO NOT WRITE ANY CODE UNTIL YOU SOLVE THE PROBLEM!
On paper you need a plan. (You need to WANT to do this step... I promise you
How can you break down the possibilities into categories.
If the probelm was asking if you had an EXACT number of bricks the problem would be very easy, why?
What are the other possibilities? / When are those possibilities true/false?

Homework:

A. CodingBat:

http://codingbat.com/java/Logic-2   (easy popcorn problems)
    -loneSum
    -LuckySum
    -noTeenSum
    -roundSum


B (if you can do this,  you are on track! )
-Make a new Git repo:  MKS21X-CtoF
-Create a java program with a class name of CtoFTester.java
-Create two functions, celsiusToFahrenheit and fahrenheitToCelsius
-BEFORE Writing the code, think about the following questions:
    -What should the functions have as parameter(s) ? What type should they be?    
    -What should the functions return?
-Compile and run as you write this, using a main function to run and test your two functions.
-Commit any time you make progress towards your goal!
Comments