CIS 160 Demonstration Programs
Comments, declaring and initializing variables
- Array0.java: using "String[] args" to get command line arguments
- Array1.java: basic array usage; passing arrays to methods
- Array2.java: reading array data from a file; dealing with partially filled arrays
people.txt: data file for Array2.java
- Array3.java: processing file data before saving it in an array;
using methods to process data
people.txt: data file for Array3.java
- Array4.java: reading parallel arrays from file
people2.txt: data file for Array4.java
- Array5.java: linear searching of arrays; using parallel arrays
people2.txt: data file for Array5.java
- Array6.java: sorting parallel arrays
people2.txt: data file for Array6.java
- Array7.java: using arrays of objects
people2.txt: data file for Array7.java
- Array8.java: using the Arrays class to sort an array of objects
array8data.txt: data file for Array8.java (make sure after transferring
data file that there is no blank line after last record and theat each record is on its own line)
- Array9.java: reading an indeterminate number of items into an array with error checking
- CardProgram1.java: creates and shuffles a deck of cards (as an array) and then deals two hands
- CardProgram2.java: creates and shuffles a deck of cards (as an array) and then lets user search for cards
- CardProgram3.java: creates and shuffles a deck of cards (as an array) using Java libraries
Object-oriented programming