// written by Sunita Kanchinadam. // This class is derived from Link class. // It implements the GetLinkSize() and GetTotalSize() abstract // methods from the Node class. // import DuVisitor; import Node; import SoftLink; import java.util.*; public class SoftLink extends Link { // constructor SoftLink (String name, Node LinkTo) { setName(name); setSize(8); link = LinkTo; } /******************************************************************/ // method : GetTotalSize // parameters : String // return value : integer // description : returns the size of the link. /******************************************************************/ public int GetLinkSize() { return(getSize()); } /******************************************************************/ // method : GetTotalSize // parameters : String // return value : integer // description : returns the total size of the directory to which it // is linked to. /******************************************************************/ public int GetTotalSize(String option) { return(link.GetTotalSize(option)); } private Node link; }