예제 #1
0
        public int totalMinutes(SIM sim)
        {
            List <call> calls        = sim.getCalls();
            int         totalMinutes = 0;

            foreach (call c in calls)
            {
                totalMinutes += c.getMinutes();
            }
            return(totalMinutes);
        }
예제 #2
0
        public List <call> callsListTowardNumber(SIM sim, String telNumber)
        {
            List <call> calls             = sim.getCalls();
            List <call> callsTowardNumber = new List <call>();

            foreach (call c in calls)
            {
                if (c.getTelNumber().Equals(telNumber))
                {
                    callsTowardNumber.Add(c);
                }
            }
            return(callsTowardNumber);
        }
예제 #3
0
 public List <call> allCalls(SIM sim)
 {
     return(sim.getCalls());
 }