American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

6 PM – Intro To Java

May 27, 2021 @ 6:00 pm - 7:00 pm

  1. We reviewed Tell Me Your Age Homework using methods.
  2. We reviewed how to use methods (functions) in Java.
  3. Homework:
    1. Create a java file May27_MethodHomework.java
    2. Inside this file, create a method
      1. saySomethingCool()
      2. it has one parameter: String name
      3. if the name parameter is “Gamas” print to the shell “Gamas works at AYCLOGIC”.
      4. otherwise print to the shell “<name> is unknown” where <name> is the name parameter.
    3. Create another method, this time method with return value:
      1. convertFromFahrenheighToCelcius()
      2. it has one parameter: fahrenheit
      3. the formula to convert from fahrenheit to celcius is
        1. Celcius = (F - 32) * 5/9
      4. So what you have to do is subtract 32 from the parameter fahrenheit and then multiple with 5 and divide by 9.
      5. return the calculation.
      6. The method needs to return a double data type.
    4. Call each of the methods.

Details

Date:
May 27, 2021
Time:
6:00 pm - 7:00 pm
Event Categories:
,
Verified by MonsterInsights