Behavioral.Iterator.Main   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 11
c 2
b 0
f 0
dl 0
loc 16
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A main(String[]) 0 14 2
1
/*
2
 * @author  : Jagepard <[email protected]>
3
 * @license https://mit-license.org/ MIT
4
 */
5
6
package Behavioral.Iterator;
7
8
public class Main {
9
10
    public static void main(String[] args) {
11
12
        ClientInterface client = new Client();
13
14
        client.addItemToTheBucket(new Item("Tights", 150, "darned"));
15
        client.addItemToTheBucket(new Item("Meat", 250, "rotten"));
16
        client.addItemToTheBucket(new Item("Bread", 40, ""));
17
18
        IteratorInterface employee = new Iterator(client.getBucket());
19
20
        try {
21
            System.out.println(employee.iterateItems());
22
        } catch (Exception e) {
23
            System.out.printf("Caught exception: %s \n", e.getLocalizedMessage());
24
        }
25
    }
26
}
27