|
|
|
|
| |
|
supernova |
Raga io faccio così ma non mi va!!!!!! Sto cazzo ... |
04-12-2003 15:19 |
|
|
supernova |
Mad For It
Registered: May 2003
Posts: 403 (0.05 al dì)
Location: Milan, London
Corso: Digital Comunication
Anno: I Don't Know, Not Yet.
Time Online: 3 Days, 4:56:55 [...]
Status: Offline
Edit | Report | IP: Logged |
Raga io faccio così ma non mi va!!!!!! Sto cazzo di binarySearch()! Che c'è che non va!!!!! HELP ME!!! HELP HELP HELP!!!!
Shape x = null;
switch (c) {
case 'r' :
video.println("La forma e' un rettangolo");
n1 = tastiera.readDouble("Inserisci l'altezza : ");
n2 = tastiera.readDouble("Inserisci la base : ");
video.println(" ");
x = new Rectangle(n1,n2);
break;
......................................................................
for (int f=0;f<MAX;f++)
int risultato = java.util.Arrays.binarySearch(forme[f],x);
if (risultato>=0){
forme[risultato].draw();
video.println("La mia area e' : " + forme[risultato].calculateArea());
}
else{
video.println("Forma non trovata");
}
__________________
" So I Start The Revolution From My Bed ". Noel Gallagher
|
04-12-2003 15:19 |
|
|
| |
|
Mifune |
[QUOTE][i]Originally posted by supernova [/i]
... |
04-12-2003 15:23 |
|
|
Mifune |
dsy moderator
Registered: Jul 2003
Posts: 3061 (0.39 al dì)
Location: Milano/ we Milano 3
Corso: Work
Anno: Work
Time Online: 20 Days, 22:03:07: [...]
Status: Offline
Edit | Report | IP: Logged |
Originally posted by supernova
Raga io faccio così ma non mi va!!!!!! Sto cazzo di binarySearch()! Che c'è che non va!!!!! HELP ME!!! HELP HELP HELP!!!!
Shape x = null;
switch (c) {
case 'r' :
video.println("La forma e' un rettangolo");
n1 = tastiera.readDouble("Inserisci l'altezza : ");
n2 = tastiera.readDouble("Inserisci la base : ");
video.println(" ");
x = new Rectangle(n1,n2);
break;
......................................................................
for (int f=0;f<MAX;f++)
int risultato = java.util.Arrays.binarySearch(forme[f],x);
if (risultato>=0){
forme[risultato].draw();
video.println("La mia area e' : " + forme[risultato].calculateArea());
}
else{
video.println("Forma non trovata");
}
io dico solo nn riesco a fare un cippo di questo eserciccio nn mi viene!!!!
__________________
Imac G5 2.1 Ghz 20" 1.5 Ram - Ibook 1.2 Ghz 12" 768 Ram - Ipod mini 4Gb - Base airport extreme - jbl creature
nippi.it - Blog
|
04-12-2003 15:23 |
|
|
| |
|
supernova |
X quanto riguarda l'ordinamento l'ho fatto con sor ... |
04-12-2003 15:27 |
|
|
supernova |
Mad For It
Registered: May 2003
Posts: 403 (0.05 al dì)
Location: Milan, London
Corso: Digital Comunication
Anno: I Don't Know, Not Yet.
Time Online: 3 Days, 4:56:55 [...]
Status: Offline
Edit | Report | IP: Logged |
X quanto riguarda l'ordinamento l'ho fatto con sort e fin li mi va, ma sto cazzo di binarySearch() mi frega!!!!!!!! QUALCUNO CI AIUTI!!!!!!!!!!
__________________
" So I Start The Revolution From My Bed ". Noel Gallagher
|
04-12-2003 15:27 |
|
|
| |
|
c3ru |
il binary search riceve un array come argomento, t ... |
04-12-2003 17:43 |
|
|
c3ru |
!ElaborA!
Registered: Oct 2003
Posts: 1678 (0.22 al dì)
Location: BG
Corso: Info Mag
Anno: 1°
Time Online: 35 Days, 19:30:22 [...]
Status: Offline
Edit | Report | IP: Logged |
il binary search riceve un array come argomento, tu mettendogli l'array[f] gli dai come argomento un oggetto
ecco perchè non va
ciao C3ru
|
04-12-2003 17:43 |
|
|
| |
|
supernova |
e cosa gli devo mettere allora ???? Fate degli ese ... |
04-12-2003 19:24 |
|
|
supernova |
Mad For It
Registered: May 2003
Posts: 403 (0.05 al dì)
Location: Milan, London
Corso: Digital Comunication
Anno: I Don't Know, Not Yet.
Time Online: 3 Days, 4:56:55 [...]
Status: Offline
Edit | Report | IP: Logged |
e cosa gli devo mettere allora ???? Fate degli esempi di come l'avete risolto. please please!!!!
__________________
" So I Start The Revolution From My Bed ". Noel Gallagher
Last edited by supernova on 04-12-2003 at 19:27
|
04-12-2003 19:24 |
|
|
| |
|
c3ru |
int x = java.util.Arrays.binarySearch (Sarr, r);
... |
04-12-2003 19:47 |
|
|
c3ru |
!ElaborA!
Registered: Oct 2003
Posts: 1678 (0.22 al dì)
Location: BG
Corso: Info Mag
Anno: 1°
Time Online: 35 Days, 19:30:22 [...]
Status: Offline
Edit | Report | IP: Logged |
int x = java.util.Arrays.binarySearch (Sarr, r);
dove Sarr è l'array di figure mentre r è la nuova figura introdotta
|
04-12-2003 19:47 |
|
|
| |
|
All times are GMT. The time now is 15:56. |
|
|
|
|
|
|
|
| |
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|