Suggested Projects


Skill-Building Exercises

  1. Further Research:   Study the Java API classes and interfaces listed in table 8-2 to better familiarize yourself with the functionality they provide.

  2. Further Research:   Conduct a web search and look for different applications for single- and multidimensional arrays.

  3. Single-Dimensional Arrays:   Write a program that lets you create a single-dimensional array of ints of different sizes at runtime using command line inputs. (Hint: Refer to example 8.9 for some ideas on how to proceed.) Print the contents of the arrays to the console.

  4. Single-Dimensional Arrays:   Write a program that reverses the order of text entered on the command line. This will require the use of the main() method’s String array.

  5. Further Research:   Conduct a web search on different sorting algorithms and how arrays are used to implement these algorithms. Also, several good sources of information regarding sorting algorithms are listed in the references section.

  6. Multidimensional Arrays:   Modify example 8.9 so that it creates two-dimensional arrays of chars. Initialize each element with the character ‘c’. Run the program several times to create character arrays of different sizes.

  7. Multidimensional Arrays:   Modify example 8.9 again so that the character array is initialized to the value of the first character read from the command line. (Hint: Refer to example 8.13 to see how to access the first character of a String.)

  8. Exploring Arrays Class Functionality:   Research the methods associated with the java.util.Arrays class and note their use. Write a short program that creates arrays of floats, ints, doubles, and Strings and use the various sort methods found in the Arrays class to sort each array. Print the contents of each array to the console both before and after sorting.




Java For Artists(c) The Art, Philosophy, and Science of Object-Oriented Programming
Java For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504052
EAN: 2147483647
Year: 2007
Pages: 452

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net