Starting from:

$29.99

Assignment #10: Create a program (using main method)

Assignment #10:

1)    Create a program (using main method) that will sort an array of int using a bubble sort algorithm.  You can declare an array of int[]  in the program.

2)    Write a program (main() method) that reads, from the terminal (screen), sequence of names and postal (ZIP) codes for individuals.  Store the data in an object designed to store a first name (String), last name (String), and postal code (int).  Assume each line of input will contain two strings followed by an integer value, each separated by a tab character.  Users will type “quit” when they have completed input entry.  After all input is complete, print the output of the input values by the user to the screen.
[Note:
1)    create an object that will store the first name (String), last name (String), postal code (int)
2)    use ArrayList to store object]

C:\Enter Input {first_name<tab>last_name<tab>zip_code}:
Bill    Smith    10002
Enter Input {first_name<tab>last_name<tab>zip_code}:
Jane    Dome    11354
Enter Input {first_name<tab>last_name<tab>zip_code}:
-1

3)    Revise #1 problem to read a list of inputs from a file.  The input file will contain two strings followed by an integer.

Input file:
Bill    Smith    10002
Jill    Ryan    11120
Robert    Johnson    11122
.
.
.

More products