Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi A - F > Fondamenti di architettura e programmazione > [Laboratorio] Es. x il 5-12 ORDINA E RICERCA FIGURE
Pages (2): « 1 [2]   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
supernova
Mad For It

User info:
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

Post actions:

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
Click Here to See the Profile for supernova Click here to Send supernova a Private Message Find more posts by supernova Add supernova to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Mifune
dsy moderator

User info:
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

Post actions:

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
Click Here to See the Profile for Mifune Click Here to See the Blog of Mifune Click here to Send Mifune a Private Message Visit Mifune's homepage! Find more posts by Mifune Add Mifune to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
supernova
Mad For It

User info:
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

Post actions:

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
Click Here to See the Profile for supernova Click here to Send supernova a Private Message Find more posts by supernova Add supernova to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
c3ru
!ElaborA!

User info:
Registered: Oct 2003
Posts: 1678 (0.22 al dì)
Location: BG
Corso: Info Mag
Anno:
Time Online: 35 Days, 19:30:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Smile

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
Click Here to See the Profile for c3ru Click Here to See the Blog of c3ru Click here to Send c3ru a Private Message Find more posts by c3ru Add c3ru to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
supernova
Mad For It

User info:
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

Post actions:

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
Click Here to See the Profile for supernova Click here to Send supernova a Private Message Find more posts by supernova Add supernova to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
c3ru
!ElaborA!

User info:
Registered: Oct 2003
Posts: 1678 (0.22 al dì)
Location: BG
Corso: Info Mag
Anno:
Time Online: 35 Days, 19:30:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Thumbs up

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
Click Here to See the Profile for c3ru Click Here to See the Blog of c3ru Click here to Send c3ru a Private Message Find more posts by c3ru Add c3ru to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 15:56.    Post New Thread    Post A Reply
Pages (2): « 1 [2]   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

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
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.039 seconds (75.30% PHP - 24.70% MySQL) con 29 query.