This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// FRQ #1: AP Computer Science Exam 2015 | |
public class DiverseArray { | |
/** | |
* Part (a) | |
* Returns the sum of the entries in the one-dimensional array arr. | |
*/ | |
public static int arraySum(int[] arr) { | |
int sum = 0; | |
for (int toSum : arr) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
public class TwoDimensionalArrays { | |
public static void main(String[] args) throws Exception { | |
TwoDimensionalArrays arrMethods = new TwoDimensionalArrays(); | |
System.out.println("-----"); | |
System.out.println("2D Array Methods\n"); | |
// countVals |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; | |
import java.awt.*; | |
import java.util.*; | |
public class MarioChar { | |
String name; | |
//TODO: Add Superpower class | |
ArrayList<String> superpowers; | |
int x; | |
int y; |