- This event has passed.
6:30 PM — Intro to Java — Shawn
May 18 @ 6:30 pm - 7:30 pm
Today We Did
- Methods
Homework
- 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 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.
- Copy the content of May11_Magic8Ball.java into May18_Magic8BallOOP. Run it and make sure it is running properly.
- Convert this into OOP:
- create run() method.
- Copy all the code from main() into run() method.
- And call the run() from main(). Look at how we did it in the May18_TellMeYourAgeMethod.java
- Convert this into OOP:
If you have any questions, email me at szhuang@ayclogic.com