Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Basically you'll want to start by searching through your input strings to find each of the names (String.contains) and set a boolean array of each field name.</p> <p>Then you'll make an array of those boolean arrays (or a list, whatever).</p> <p>Then you simply sort through them, looking for T/F and printing corresponding messages.</p> <p>I included some very rough pseudocode, assuming I am understanding your problem correctly.</p> <pre><code>// For first row List labelStrings[]; labelStrings = {"Event", "John", "Joe", "Mary", "Ted", "Jessica"}; // For the matrix data // List to iterate horizontally EDIT: Made boolean! List&lt;Boolean&gt; strList= new ArrayList()&lt;List&gt;; // List to iterate vertically List&lt;List&gt; = listList new ArrayList()&lt;List&gt;; /* for all the entries in AttendanceRecord (watch your spelling, OP) for all data sets mapping title to employee add the row data to strList[entry_num] */ for (int i = 0; i &lt; listList.size()-1; i++) for (int j = 0; j &lt; labelStrings.size()-1; j++) { if (i == 0) System.out.println(strList[j] + "\t\n\n"); else { // print listLists[i][j] } // iterate row by row (for each horizontal entry in the column of entries) } </code></pre> <p>Sorry, I'm just reading through the comments now.</p> <p>You'll definitely want to arrange your data in a way that is easy to iterate through. Since you have a fixed table size, you could hardcode a boolean array for each entry and then print on validation they were mapped to the event as indicated in your input string.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload