public class Program {
    public static void main(String[] args) {
        LinkedList list = new LinkedList();
        assert list.size() == 0 : "Expected 0 but was " + list.size();
        assert list.getHead() == null : "Expecte null but was " + list.getHead();
        assert list.getTail() == null : "Expecte null but was " + list.getTail();
        
        // All tests are passed!
        System.out.println("All tests are passed!");
    }
}

// LinkedList class
class LinkedList {
    private Object head, tail;
    private int size;

    public Object getHead() {
        return head;
    }
    
    public Object getTail() {
        return tail;
    }
    
    public int size() {
        return size;
    }
}
@@ -361,152 +361,647 @@
     
-// All tests are passed!%0A        System.out.println(%22All tests are passed!%22);%0A    %7D%0A%7D%0A%0A// LinkedList class%0Aclass LinkedList %7B%0A    private Object
+list.add(1); list.add(2); list.add(3);%0A        assert list.size() == 3 : %22Expected 3 but was %22 + list.size();%0A        assert list.getHead().value == 1 : %22Expecte 1 but was %22 + list.getHead().value;%0A        assert list.getTail().value == 3 : %22Expecte 3 but was %22 + list.getTail().value;%0A        // All tests are passed!%0A        System.out.println(%22All tests are passed!%22);%0A    %7D%0A%7D%0A%0A// LinkedList class%0Aclass LinkedList %7B%0A    // data structure%0A    class Node %7B%0A        public int value;%0A        public Node next;%0A        %0A        public Node(int value) %7B%0A            this.value = value;%0A        %7D%0A    %7D%0A    %0A    // variables%0A    private Node
  hea
@@ -1032,16 +1032,38 @@
  size;%0A%0A
+    // getter methods%0A
     publ
@@ -1061,30 +1061,28 @@
 %0A    public 
-Object
+Node
  getHead() %7B
@@ -1129,14 +1129,12 @@
 lic 
-Object
+Node
  get
@@ -1217,17 +1217,397 @@
 urn size;%0A    %7D%0A
+    %0A    // functional methods%0A    public void add(int value) %7B%0A        Node node = new Node(value);%0A        Node curTail = getTail();%0A        %0A        this.tail = node;%0A        if (curTail != null) %7B%0A            curTail.next = node;%0A        %7D%0A        %0A        Node curHead = getHead();%0A        if (curHead == null) %7B%0A            this.head = node;%0A        %7D%0A        ++size;%0A    %7D%0A
 %7D

implement linkedlist.add()