public medNode findMed(string medName)
        {
            if (firstMed == null)
            {
                //If first med is null there are no meds
                M.debug("First Med is null");
                return(null);
            }

            else
            {
                MS = firstMed;
                while (MS.getNextMed() != null)
                {
                    if (MS.getName().Equals(medName))
                    {
                        //Return first found med with proper name
                        M.debug("Return found value");
                        return(MS);
                    }
                }

                //returning null if nothing found
                M.debug("Nothing found returning null");
                return(null);
            }
        }
示例#2
0
 public void toString()
 {
     Console.WriteLine("Timer Name: " + timerName);
     Console.Write("Link Medication: " + med.getName());
     Console.WriteLine("Home Path: " + pathName);
 }