« All Events
1 PM Intro to Java Alexander Lee
April 23, 2022 @ 1:00 pm - 2:00 pm
Today We Did:
- We learned about using methods and the difference between static and non-static.
- We also learned about what to do when the method is either void or has a data type.
For Homework:
- Create a new Magic8Ball project but this time use the asList and randomly grab an answer from the list using a random index and then print it out.
- Create a new Java class <date>_MethodsHomework.java
- Create a new method convertFromFahrenheitToCelcius. It has one parameter int Fahrenheit. Inside the method, it will convert the Fahrenheit parameter into Celcius by using this formula (F − 32) × 5/9 = C . You have to return the result. This is very similar to what we did in the class with addFourNumbers method.
- Along with that create another method that asks for your favorite song, and if the song is “Shape of You” then say that it is your favorite song, otherwise say that the song is alright.