Unit tests the Bag data type. @param args the command-line arguments
(String[] args)
| 137 | * @param args the command-line arguments |
| 138 | */ |
| 139 | public static void main(String[] args) { |
| 140 | Bag<String> bag = new Bag<String>(); |
| 141 | while (!StdIn.isEmpty()) { |
| 142 | String item = StdIn.readString(); |
| 143 | bag.add(item); |
| 144 | } |
| 145 | |
| 146 | StdOut.println("size of bag = " + bag.size()); |
| 147 | for (String s : bag) { |
| 148 | StdOut.println(s); |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | } |
| 153 |
nothing calls this directly
no test coverage detected