import uwcse.io.*; /** * A class to illustrate the concept of dynamic allocation.
* The class methods allow the user to input an unknown number of grades * (between 0 and 100). Internally the grades are stored in array that grows * in size as more grades are entered. */ public class DynamicAllocation { /** * Input an unknown number of grades (store them in an array that * grows in size as more grades are entered). */ public void inputGrades() { // Define the array (empty initially) int[] grades = new int[0]; // Read the grades in a loop // Store each grade in the array grades // Display all of the grades } /** * Return an array that contains a copy of the array sent and that * is one element bigger than the array sent. * @param a the array to copy */ private int[] copyAndIncreaseSizeByOne(int[] a) { int[] temp = new int[0]; // change this! return temp; } }