Lesson #3

PHOTO EMBED

Wed Sep 21 2022 04:33:46 GMT+0000 (Coordinated Universal Time)

Saved by @testpro #java

class Main {
    public static void main(String[] args) {
      
      // Write a simple application to finish the assignments below
  
      // Assignment #1
      // - Declare an integer variable with the value of 75
      // - Write if\else statement to check whether it is a even or odd number (using remainder operator)
      // - If the value is even, print out "It's an odd number", otherwise "It's an even number"
      // - Change the value to 346 and make sure it shows a different result now
      // - Congrats on your first simplified Unit Test! (this is how we test our own code)
      System.out.println("Assignment #1");
  
      // Assignment #2
      // - Declare an integer variable with the value of 1
      // - Write switch case statement to determine a day of the week based on its number
      // - If the value is equal to 1, print out "It's Sunday" and so on
      // - Change the value to 6 and make sure it also prints out the correct result
      System.out.println("Assignment #2");
  
      // Check the answers and submit your homework by clicking 'Submit' button at top right
    }
  }
content_copyCOPY