#33 Completed person handler lab

Open
jonathan-hinds wants to merge 1 commits from jonathan-hinds/CR-MesoLabs-Arrays-PersonDetails:master into master
1 changed files with 16 additions and 0 deletions
  1. 16
    0
      src/main/java/com/zipcodewilmington/PersonHandler.java

+ 16
- 0
src/main/java/com/zipcodewilmington/PersonHandler.java View File

21
                 // append `stringRepresentation` to `result` variable
21
                 // append `stringRepresentation` to `result` variable
22
 
22
 
23
             // end loop
23
             // end loop
24
+
25
+        int i = 0;
26
+        while(i < personArray.length){
27
+            result += personArray[i].toString();
28
+            i ++;
29
+        }
30
+
24
         return result;
31
         return result;
25
     }
32
     }
26
 
33
 
39
                 // append `stringRepresentation` to `result` variable
46
                 // append `stringRepresentation` to `result` variable
40
             // end loop
47
             // end loop
41
 
48
 
49
+        for(int i = 0; i < personArray.length; i ++){
50
+            Person currentPerson = personArray[i];
51
+            result += currentPerson.toString();
52
+        }
53
+
42
         return result;
54
         return result;
43
     }
55
     }
44
 
56
 
55
                 // append `stringRepresentation` to `result` variable
67
                 // append `stringRepresentation` to `result` variable
56
             // end loop
68
             // end loop
57
 
69
 
70
+        for(Person person : personArray){
71
+            result += person.toString();
72
+        }
73
+
58
         return result;
74
         return result;
59
     }
75
     }
60
 
76