American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6 PM – Intro To Java – Gamas

February 21 @ 6:00 pm - 7:00 pm

Today We Did
  1. We went over Random
  2. We went over methods
Homework
  1. Create Feb21Magic8BallHW.java
    1. https://www.ayclogic.com/intro-to-python/magic-8-ball/
  2. Create Feb21ConvertFromFahrenheitToCelciusHW.java
    1. 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.
    2. Create a new method run() . Inside this method, create a while loop to continuously ask user “Enter the temperature in Fahrenheit (enter ‘exit’ to quit): “. And then call convertFromFahrenheitToCelcius  and pass the user input as the parameter. Get the return value from the method and print “100 Fahrenheit is 36 celcius”.
    3. Example
      1. Welcome to AYC Temperature Converter
        
        Enter the temperature in Fahrenheit (enter 'exit' to quit): 100
        100 Fahrenheit is 36 celcius.
        
        Enter the temperature in Fahrenheit (enter 'exit' to quit): 32
        32 Fahrenheit is 0 celcius.
        
        Enter the temperature in Fahrenheit (enter 'exit' to quit): exit
        Thank you for using AYC Temperature Converter.

Details

Date:
February 21
Time:
6:00 pm - 7:00 pm
Verified by MonsterInsights