American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

5 PM – Intro To Java

December 11, 2021 @ 5:00 pm - 6:00 pm

Homework
  1. Create Dec11Magic8BallV2.java and do the Magic8Ball using the List.
  2. Create another Java file Dec11MethodHomework.java
  3. Inside this file, create a method
    • favoriteSport(String sport)
    • if the name parameter is “Volleyball” (non-casesensitive) print to the shell “Volleyball is a my favorite sport “.
    • otherwise print to the shell “<sport> is not my favorite sport”
  4. Create another method, this time method with return value (double):
    • convertFromFahrenheitToCelcius(int fahrenheit)
    • it has one parameter: fahrenheit
    • the formula to convert from fahrenheit to celcius is
      • Celcius = (F - 32) * 5/9
    • So what you have to do is subtract 32 from the parameter fahrenheit and then multiple with 5 and divide by 9.
    • return the calculation.
    • The method needs to return a double data type.
  5. Call each of the methods from main method.

Details

Date:
December 11, 2021
Time:
5:00 pm - 6:00 pm
Event Categories:
,
Verified by MonsterInsights