Special Projects - Project #4 - Tables and Sorting
This programming project will involve the study of two aspects of programming:
Sorting and a Table.
1. Sorting is one the most discussed topics in upper level programming. Finding an efficient sorting method has become the goal of many computer scientists. In this project you will look at two of the basic types of sorting algorithms:
- Selection sort
- Insertion sort
Read through pages 322 - 336 of the dark blue Java Software Solutions book. These pages talk more about sort than you will need to know for this project, but will provide you with more background on sorting. You can also do an internet search as well on these topics.
2. Tables. Go to the following websites to learn about creating tables in Java:
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
Assignment:
For this programming assignment you will create a 5 x 4 table (5 rows by 4 columns)
Note: the column headings are not one of the 5.
The column headings will be as follows: First Name, Last Name, Age, Test Score
The table will then include the following entries:
Smith Dave 12 75
Johnson Bill 14 72
Anderson Sara 11 92
Hoyez Kara 16 83
Cruz Kyle 13 84
The table will have a comboBox that includes the 4 headings. There will also be two buttons (“0-9/A-Z” ) and (“9-0/Z-A”)
The user will choose by which heading the table should be sorted and then press the button as to how it will be sorted. When that button is pressed the table will be sorted and appear correctly with the correct information for each person.
*******Note: As 2 of the headings are Strings and 2 are integers, you will need to make the sorting of the Last name and age a selection sort and the sorting of the First name and test score insertion sorts.