American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

3 PM – Intro To Java – Gamas

January 8, 2022 @ 3:00 pm - 4:00 pm

Today We Do
  1. We finished reviewing Guess A Number between 0 to 100 game.
  2. We started explaining about methods.
Homework
  1. If you are done with “tellMeYourAge” method, please try to finish it as part of the homework.
  2. Create a java file Jan8_MethodHomework.java. Inside this file, create a method favoriteSport(String sport). If the sport 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”. Call the method from main.
  3. Create another method, this time method with return value: convertFromFahrenheitToCelcius(int fahrenheit).
    • it has one parameter: fahrenheit the formula to convert from fahrenheit to celcius is  Celcius = (fahrenheit – 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.
    • Call the method from main.
  4. If you have question, please feel free to email me to gamas@ayclogic.com

 

Details

Date:
January 8, 2022
Time:
3:00 pm - 4:00 pm
Verified by MonsterInsights