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 > [SearchAShape] Dubbi
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
[>>>VK<<<]
Guest

User info:
Registered: Not Yet
Posts: N/A (0 al dì)
Location:
Corso:
Anno:
Time Online: [...]
Status:

Post actions:

Edit | Report | IP: Logged
SearchAShape, Spiegatemi che vogliono!!!

Riprendere il codice della classe ReadArrayOfShapes ed usarlo per scrivere la classe SearchAShape che:
• legge un array di Shape (sempre di 15 elementi),
• ordina l'array in base all'area, e
• cerca al suo interno una figura di area pari ad una nuova figura introdotta da tastiera (fate attenzione non dovete trovare la stessa figura bensì una figura di ugual area).
Nota: usare la classe Arrays vista a lezione per ordinare l'array (sort()) e per effettuare la ricerca (binarySearch()).

DOMANDE:

1- Come funziona il metodo BinarySeach, mi potete fare esempi.
2- Esattamente che vogliono, l'area che devo trovare è già dentro all'Array o la immetti come nuova?


HeLP ME!!!!!!!!!!!!

07-01-2005 16:45
Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
0m4r
.grande:maestro.

User info:
Registered: Mar 2002
Posts: 7287 (0.87 al dì)
Location: Düsseldorf (DE)
Corso:
Anno: ESAMI FINITI
Time Online: 49 Days, 0:42:50 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Re: SearchAShape, Spiegatemi che vogliono!!!

Originally posted by [&gt;&gt;&gt;VK&lt;&lt;&lt;]
1- Come funziona il metodo BinarySeach, mi potete fare esempi.


- java.util.Collections.binarySearch
- google?

Originally posted by [&gt;&gt;&gt;VK&lt;&lt;&lt;]
2- Esattamente che vogliono, l'area che devo trovare è già dentro all'Array o la immetti come nuova?


io credo che tu debba trovare una figura presente nell'array che abbia la stessa area di una figura che tu specifichi...

__________________
http://www.twitter.com/0m4r

Last edited by 0m4r on 07-01-2005 at 17:05

07-01-2005 17:02
Click Here to See the Profile for 0m4r Click Here to See the Blog of 0m4r Click here to Send 0m4r a Private Message Find more posts by 0m4r Add 0m4r to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
foolish
bleak

User info:
Registered: Oct 2003
Posts: 3585 (0.46 al dì)
Location:
Corso:
Anno:
Time Online: 36 Days, 7:28:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

1) http://www.dimi.uniud.it/cicloinf/d...ta2/binaria.htm

2) devi dare al pgm una nuova figura (scrivendola da tastiera, quindi creare un menù ed un procedimento apposito), calcolare l'area di questa nuova figura e ricercare una figura con ugual area all'interno dell'array precedentemente ordinato in base all'area.

;)

__________________
The only way to discover the limits of the possible is to go beyond them into the impossible.
Arthur C. Clarke.

07-01-2005 17:06
Click Here to See the Profile for foolish Click Here to See the Blog of foolish Click here to Send foolish a Private Message Find more posts by foolish Add foolish to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 06:44.    Post New Thread    Post A Reply
  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.049 seconds (81.71% PHP - 18.29% MySQL) con 26 query.