Java Programming homework

profileBell0216
fall2013_assignment_32.doc

North Carolina A&T State University

ITT 240-01- Java

Fall - 2013

Assignment 3

· Due on Wednesday October 9th.

· Soft copy to be sent by e-mail or posted to Bb.

· Source file(s) is/are required

· Output screen snapshots also are required

· Word document explains the answers for each part.

· Please write your name and student ID at the top of the word document

Programming Exercises

EX 1:

(Finding the smallest element) Write a method that finds the smallest element in an array of integers. Use {1, 2, 4, 5, 10, 100, 2, –22} to test the method.

EX 2:

(Increasing array size) Once an array is created, its size is fixed. Occasionally, you need to add more values to an array, but it is full. In such cases, you can create a new, larger array to replace the existing array. Write a method with the following header: public static int[] doubleCapacity(int[] list). The method returns a new array that doubles the size of the parameter list.

Reading Exercise

Read chapter 3. Propose 6 – 12 keywords. Compose 2 – 3 sentences to describe each chapter in a concise, comprehensive, and unambiguous manner.

PAGE

Dr. Naser El-Bathy Page 1