import java.io.*; import javax.swing.event.*; import java.util.*; public class computer { private static int ckey; private static int cpuKey; private static int memoryKey; private static int hardDrive; private static String motherBoard; private static String record; public computer(String record) { parseRecord(record); } public computer() { System.out.println("Please pass in a string line containing the computer information"); } public String toString() { return record; } public int returnCkey() { return ckey; } public int returnCpuKey() { return cpuKey; } public int returnMemoryKey() { return memoryKey; } public int returnHardDrive() { return hardDrive; } public String returnMotherBoard() { return motherBoard; } // takes in a String containing all the Computer information // and breaks it into it's specific parts public void parseRecord(String record) { this.record = record; StringTokenizer st = new StringTokenizer(record, ","); ckey = Integer.parseInt(st.nextToken()); cpuKey = Integer.parseInt(st.nextToken()); memoryKey = Integer.parseInt(st.nextToken()); hardDrive = Integer.parseInt(st.nextToken()); motherBoard = st.nextToken(); } } // of CPU