Name: Neshelle P.
Llagas Section: EG1
Task 1: Simple Arithmetic
Description:
Write a Java program that asks the user to input two numbers and prints:
• Sum
• Difference
• Product
• Quotient
Concepts: Scanner, arithmetic operators (+ - * /)
CODE SNIPPET:
OUTPUT:
Task 2: Even or Odd Checker
Objective: Learn conditionals and modulus operator.
Description:
Write a program that reads a number from the user and prints whether it is even or odd.
Concepts: if-else, % operator
CODE SNIPPET:
OUTPUT:
Task 3: Favorite Fruits List
Objective: Learn about arrays/ArrayList and loops.
Description:
Create an ArrayList to store 5 favorite fruits. Display all the fruits using a loop.
Concepts: ArrayList, for-each loop
CODE SNIPPET:
OUTPUT:
Task 4: Name and Age Calculator
Objective: Combine input, variables, and basic arithmetic.
Description:
Write a program that asks the user for their name and birth year, then calculates and prints:
Hello [name]! You are [age] years old.
Concepts: Scanner, variables, arithmetic, [Link]
CODE SNIPPET:
OUTPUT:
Task 5: Simple Grading System
Objective: Learn conditionals and logical operators.
Description:
Write a program that asks the user for a score (0–100). Print the grade based on the score:
• 90–100: A
• 80–89: B
• 70–79: C
• 60–69: D
• Below 60: F
Concepts: if-else if-else, logical operators (&&)
CODE SNIPPET:
OUTPUT: