- This event has passed.
3 PM – Introduction To Java
March 14, 2020 @ 3:00 pm - 4:00 pm
- We went over last week homework. Data Type and how to get input from shell.
- We also went over IF ELSE ELSE IF statements today.
- Homework:
- Create a new Java class in intelliJ: Mar14_HomeworkIFELSE
- Inside this Java class, get Integer/Number input from user “Give me a number? “
- After you get the input, print whether or not this number is a positive or negative number.
- For example, if user enters -4, the program will print “-4 is a negative number” to the shell. If user enters 1000, the program will print “1000 is a positive number”.
- In the same Java class, do the following
- Ask user to input their age. “How old are you? “
- If users enter age less than 10, print “You can watch this movie for free”.
- if user enter age less than 20, print “You have to pay $5”.
- if user enter age bigger than 60, print “You can watch this movie for $2”.
- Create a new Java class in intelliJ: Mar14_HomeworkIFELSE