MCPcopy
hub / github.com/kevin-wayne/algs4 / main

Method main

src/main/java/edu/princeton/cs/algs4/Bag.java:139–150  ·  view source on GitHub ↗

Unit tests the Bag data type. @param args the command-line arguments

(String[] args)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

isEmptyMethod · 0.95
readStringMethod · 0.95
addMethod · 0.95
printlnMethod · 0.95
sizeMethod · 0.95

Tested by

no test coverage detected