Guest User

Untitled

a guest
Nov 19th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. import javax.swing.*;
  2.  
  3. public class StazioniSintonizzate {
  4.     public static int quanteStazioni(Televisore[] t, String stazione) {
  5.         int num = 0;
  6.         for(int i = 1; i <= t.length + 1; i++) {
  7.             for(int j = 1; j <= t[j].quantiCanali() + 1; j++) {
  8.                 if (t[j].qualeStazione(j).equals(stazione)) {
  9.                     num++; }
  10.             }
  11.         }
  12.         return num;
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment