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 > [LAB] Esercizi
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
monterika
.fedelissimo.

User info:
Registered: Sep 2004
Posts: 48 (0.01 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: 1
Time Online: 20:54:20 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Esercizi Silab!

Ma avete letto il testo dell'esercizio TemporaryFile? Non riesco a capire cosa chiede l'esercizio anche perchè secondo me non è stato usato un italiano decente. Se qualcno l'ha capito potrebbe spiegarlo?
Grazie Ciaoooooo

__________________
My sites!!!!
http://digilander.libero.it/ashevchenko
http://digilander.libero.it/letsdance2003

16-01-2005 17:12
Click Here to See the Profile for monterika Click here to Send monterika a Private Message Visit monterika's homepage! Find more posts by monterika Add monterika to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lunik
dsy core staff

User info:
Registered: Mar 2002
Posts: 22362 (2.57 al dì)
Location: Milano
Corso: ComDig
Anno: Dott.ssa
Time Online: 93 Days, 0:52:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

info gen turno 1 o 2?

__________________
Il DSY su Facebook!!!

16-01-2005 17:33
Click Here to See the Profile for Lunik Click Here to See the Blog of Lunik Click here to Send Lunik a Private Message Visit Lunik's homepage! Find more posts by Lunik Add Lunik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
monterika
.fedelissimo.

User info:
Registered: Sep 2004
Posts: 48 (0.01 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: 1
Time Online: 20:54:20 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Turno 2!!!!!

__________________
My sites!!!!
http://digilander.libero.it/ashevchenko
http://digilander.libero.it/letsdance2003

16-01-2005 17:45
Click Here to See the Profile for monterika Click here to Send monterika a Private Message Visit monterika's homepage! Find more posts by monterika Add monterika to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
yeah
.grande:maestro.

User info:
Registered: Nov 2003
Posts: 1644 (0.20 al dì)
Location: Cologno Monzese
Corso: Informatica Magistrale
Anno: II
Time Online: 12 Days, 21:36:41 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Poi postare il testo o un link?

__________________
?

16-01-2005 20:08
Click Here to See the Profile for yeah Click here to Send yeah a Private Message Find more posts by yeah Add yeah to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Konrad
.illuminato.

User info:
Registered: Dec 2004
Posts: 155 (0.02 al dì)
Location:
Corso: Comunicazione Digitale
Anno:
Time Online: 2 Days, 20:41:06: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Dici questo?

Costruire la classe TemporaryFile che implementi

la variabile di istanza String prefix

il metodo String getName() che una ritorni una stringa contenente il possibile nome di un file NON esistente nella directory corrente che inizi con il contenuto della variabile prefix


Suggerimento 1: generate una serie di nomi di file tramite una regola e di volta in volta provate ad aprire i file in lettura. Utilizzate "al contrario" l'eccezione FileNotFoundException: quando questa viene lanciata, il nome generato è corretto.


Suggerimento 2: per generare la serie di nomi basta una semplice regola. Ad esempio basta aggiungere ogni volta un determinato carattere al prefisso di partenza: se questo vale "ciao", basterà verificare se esista un file di nome "ciao"; se questo non esiste il metodo ritornerà "ciao", altrimenti verificherà se esista un file di nome "ciao1", eventualmente continuando a considerare "ciao11", "ciao111" e così via.


In effetti e' parecchio incomprensibile :?


Da quel poco che ho capito:

Crei una variabile stringa (prefix)

Costruisci un metodo che presa la variabile prefix crei una nuova stringa contenente prefix+qualcosa (es prefix="ciao" ritornera' "ciao111)e suppongo chiami un file (inesistente) con lo stesso nome.

Crei un ciclo che generi dei nomi e che provi ad aprire un file con il nome generato dal ciclo(es: il ciclo provera' ciao,ciao1,ciao11,ciao111).
Il nome sara' corretto quando NON sara' chiamata l'eccezione filenotfound.


E questo e' tutto...cercate di dirmi se il ragionamento e' corretto :)

Last edited by Konrad on 16-01-2005 at 23:11

16-01-2005 23:08
Click Here to See the Profile for Konrad Click here to Send Konrad a Private Message Find more posts by Konrad Add Konrad to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
yeah
.grande:maestro.

User info:
Registered: Nov 2003
Posts: 1644 (0.20 al dì)
Location: Cologno Monzese
Corso: Informatica Magistrale
Anno: II
Time Online: 12 Days, 21:36:41 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Direi che è corretto, se non per

Il nome sara' corretto quando NON sara' chiamata l'eccezione filenotfound.
in cui toglierei il 'NON' :)

__________________
?

17-01-2005 00:03
Click Here to See the Profile for yeah Click here to Send yeah a Private Message Find more posts by yeah Add yeah to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Michæl
.novellino.

User info:
Registered: Oct 2004
Posts: 3 (0.00 al dì)
Location: Milano.. (Forza Rozzampia)
Corso: Comunicazione Digitale
Anno: The First
Time Online: 2:05:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

io più che altro non ho compreso l'utilità di costruire un metodo apposito getName per verificare se il file già esiste o meno..

tanto vale farlo nel main o sbaglio?

__________________
.. alæ lucis, tenebris conspersis, mortem retinere nunquam postea, ad cælum exlamaverunt..

21-01-2005 11:40
Click Here to See the Profile for Michæl Click here to Send Michæl a Private Message Find more posts by Michæl Add Michæl to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
0m4r
.grande:maestro.

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

Post actions:

Edit | Report | IP: Logged

Originally posted by Michæl
tanto vale farlo nel main o sbaglio?


sbagli.
Pensa alla riusabilità del codice, pensa alla programmazione ad oggetti, esci dal limite di scrivere codice perchè lo devi fare per un esame...

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

21-01-2005 12:05
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
Michæl
.novellino.

User info:
Registered: Oct 2004
Posts: 3 (0.00 al dì)
Location: Milano.. (Forza Rozzampia)
Corso: Comunicazione Digitale
Anno: The First
Time Online: 2:05:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ma il metodo getName() da chi lo faccio richiamare?

__________________
.. alæ lucis, tenebris conspersis, mortem retinere nunquam postea, ad cælum exlamaverunt..

21-01-2005 14:45
Click Here to See the Profile for Michæl Click here to Send Michæl a Private Message Find more posts by Michæl Add Michæl to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
0m4r
.grande:maestro.

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

Post actions:

Edit | Report | IP: Logged

questo non lo so, non conosco il testo del progetto.

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

21-01-2005 15:35
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
All times are GMT. The time now is 08:16.    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.081 seconds (68.60% PHP - 31.40% MySQL) con 26 query.