// A database of records import java.util.*; public class Database { // One record in the database private class Record { private String lastName; private String firstName; private int ID; private int lastLogin; public Record( String lastName, String firstName, int ID, int lastLogin ) { this.lastName = lastName; this.firstName = firstName; this.ID = ID; this.lastLogin = lastLogin; } public String toString() { return lastName + ", " + firstName + ", " + ID + ", " + lastLogin; } } // Populate the database with some data private Record [] records = new Record[6]; Database() { records[0] = new Record( "Stewart", "Duncan", 2203245, 100000 ); records[1] = new Record( "MacKenzie", "Colin", 2211171, 100221 ); records[2] = new Record( "Bellotti", "Anne", 2300017, 100300 ); records[3] = new Record( "Chang", "Richard", 2191933, 100354 ); records[4] = new Record( "Erickson", "Thomas", 2203577, 100490 ); records[5] = new Record( "Misfit", "Ima", 2805472, 100532 ); } }