- This event has passed.
5 PM – Intro to Java – Joel
July 15 @ 5:00 pm - 6:00 pm
Today we did:
- We learned about methods.
Homework:
- Make a new file called July15_MethodsHomework.
- Do the same steps in making the mainClass variable like we did in the lesson.
- 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.
- Create another new method getRandomAnimal. Inside the method create the list of animals (up to you which animals), and return a random animal from the list. You can define Random inside the method.
- Don’t forget to call both methods in the main. The arguments you call it with are up to you.