Answered 3 days AfterApr 02, 2021

Answer To: hi

Kshitij answered on Apr 02 2021
156 Votes
War game/wargame/base/EmptyCollectionException.java
War game/wargame/base/EmptyCollectionException.java
/*   Created by IntelliJ IDEA.
 *   Author: Kshitij Varshney (kshitijvarshne1)
 *   Date: 03-Apr-21

 *   Time: 12:21 PM
 *   File: EmptyCollectionException.java
 */
package April.api02_21.wargame.base;
public class EmptyCollectionException extends Exception {
    public EmptyCollectionException(String message) {
        System.out.println("All card are used");
    }
}
War game/wargame/base/LinearNode.java
War game/wargame/base/LinearNode.java
/*   Created by IntelliJ IDEA.
 *   Author: Kshitij Varshney (kshitijvarshne1)
 *   Date: 03-Apr-21
 *   Time: 12:20 PM
 *   File: LinearNode.java
 */
package April.api02_21.wargame.base;
/**
 * Represents a node in a linked list.
 *
 * @author Java Foundations
 * @version 4.0
 */
public class LinearNode
{
    private LinearNode next;
    private T element;
    /**
     * Creates an empty node.
     */
    public LinearNode()
    {
        next = null;
        element = null;
    }
    /**
     * Creates a node storing the specified element.
     * @param elem element to be stored
     */
    public LinearNode(T elem)
    {
        next = null;
        element = elem;
    }
    /**
     * Returns the node that follows this one.
     * @return reference to next node
     */
    public LinearNode getNext()
    {
        return next;
    }
    /**
     * Sets the node that follows this one.
     * @param node node to follow this one
     */
    public void setNext(LinearNode node)
    {
        next = node;
    }
    /**
     * Returns the element stored in this node.
     * @return element stored at the node
     */
    public T getElement()
    {
        return element;
    }
    /**
     * Sets the element stored in this node.
     * @param elem element to be stored at this node
     */
    public void setElement(T elem)
    {
        element = elem;
    }
}
War game/wargame/base/LinkedStack.java
War...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here