public int totalMinutes(SIM sim) { List <call> calls = sim.getCalls(); int totalMinutes = 0; foreach (call c in calls) { totalMinutes += c.getMinutes(); } return(totalMinutes); }
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); }
public List <call> allCalls(SIM sim) { return(sim.getCalls()); }