Popcorn Hack #1

// Initialize and loop over a number
// Check if the number is even
public int doSomething(int[] nums) {
    int result = 0;
    for (int i = 0; i < nums.length; i++) {
        if (nums[i] > 0 && nums[i] % 2 == 0) {
            result += nums[i];
        }
    }
    return result;
}

Popcorn Hack #2

// Take in the category, name, and score of an assignment
public void addAssignment(String category, String name, double score) { }

// Set how much a particular category is weighted
public void setCategoryWeight(String category, double weight) { }

// Calculate the final grade
public double calculateFinalGrade() { }

// Generate Report based off acquired data
public String generateReport() { } 
|   public double calculateFinalGrade() { }

missing return statement