MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / add

Method add

strings/ReceiptBuilder.java:17–20  ·  view source on GitHub ↗
(String name, int qty, double price)

Source from the content-addressed store, hash-verified

15 "%-15s %5s %10s%n", "----", "---", "-----");
16 }
17 public void add(String name, int qty, double price) {
18 f.format("%-15.15s %5d %10.2f%n", name, qty, price);
19 total += price * qty;
20 }
21 public String build() {
22 f.format("%-15s %5s %10.2f%n", "Tax", "",
23 total * 0.06);

Callers 7

mainMethod · 0.95
mainMethod · 0.45
PeopleMethod · 0.45
mainMethod · 0.45
mainMethod · 0.45
RandomWordsMethod · 0.45
FileToWordsBuilderMethod · 0.45

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected