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 > [Progetto] MyLanguage - Esecuzione file .java
Pages (6): « 1 [2] 3 4 5 6 »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.09 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Inoltre l'indentazione deve andare bene per tutti i main non solo per quello fornito dal prof altrimenti sarebbe troppo facile...penso che bisogna fare dei controlli nei vari toString.....

07-02-2006 11:29
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
spenk.85
.illuminato.

User info:
Registered: Nov 2005
Posts: 196 (0.03 al dì)
Location: Muggiò
Corso: Comunicazione Digitale
Anno: x
Time Online: 1 Day, 12:55:02: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

esatto! il problema è che nei metodi toString delle classi, a parte sequenza, è detto esplicitamente quanti spazi,eventuali car a capo vanno inseriti!
di conseguenza la chiave di tutto il metodo toString della classe sequenza

07-02-2006 11:43
Click Here to See the Profile for spenk.85 Click here to Send spenk.85 a Private Message Find more posts by spenk.85 Add spenk.85 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Corla
.novellino.

User info:
Registered: Jan 2006
Posts: 3 (0.00 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno: Primo
Time Online: 23:03:25 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

questo è quello che stampa a me:

DECLARE s;
DECLARE arg1;
arg1 = 7;
IF (arg1<=0)
..PRINT "Primo argomento invalido";
ELSE
..DECLARE arg2;
..arg2 = 4;
..IF (arg2<=0)
....PRINT "Secondo argomento invalido";
..ELSE
....WHILE (arg1!=0)
......arg1 -= 1;
......s += 1;
....WHILE (arg2!=0)
......arg2 -= 1;
......s += 1;
....PRINT s;

Last edited by Corla on 07-02-2006 at 12:08

07-02-2006 12:06
Click Here to See the Profile for Corla Click here to Send Corla a Private Message Find more posts by Corla Add Corla to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.09 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Corla manca tutta l'indentazione e poi la stampa della somma finale!

07-02-2006 12:07
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Vikyg13
.arcimaestro.

User info:
Registered: Feb 2006
Posts: 290 (0.04 al dì)
Location:
Corso: Comunicazione Digitale
Anno: Primo
Time Online: 3 Days, 1:12:06: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ma stando a quanto scritto nelle indicazioni del progetto, nel toString() di Stampa c'è alla fine un carattere di newline...Io l'ho messo ma in pratica anzicchè andare solo a capo si forma una riga vuota sotto ogni stringa di Stampa...Sbaglio qlcsa?

07-02-2006 12:11
Click Here to See the Profile for Vikyg13 Click here to Send Vikyg13 a Private Message Find more posts by Vikyg13 Add Vikyg13 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
arcieredighiaccio
.novellino.

User info:
Registered: Jun 2002
Posts: 8 (0.00 al dì)
Location: Paderno Dugnano
Corso:
Anno:
Time Online: 2:57:26 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Il toString di sequenza noi lo abbiamo fatto così:

for(int i=0;i<elenco.length; i++)
return elenco[i].toString();

Tuttavia continua a darci errore nel programma.java.
Qualcuno è venuto a capo di questa situazione?

__________________
L'Arciere di Ghiaccio

07-02-2006 13:50
Click Here to See the Profile for arcieredighiaccio Click here to Send arcieredighiaccio a Private Message Find more posts by arcieredighiaccio Add arcieredighiaccio to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
spenk.85
.illuminato.

User info:
Registered: Nov 2005
Posts: 196 (0.03 al dì)
Location: Muggiò
Corso: Comunicazione Digitale
Anno: x
Time Online: 1 Day, 12:55:02: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by arcieredighiaccio
Il toString di sequenza noi lo abbiamo fatto così:

for(int i=0;i<elenco.length; i++)
return elenco[i].toString();

Tuttavia continua a darci errore nel programma.java.
Qualcuno è venuto a capo di questa situazione?

come fai a mettere il return dentro il ciclo for?!
devi creare una stringa nella quale metti concatenando tutte le descrizioni delle istruzioni, e poi ritorna quest ultima

07-02-2006 14:10
Click Here to See the Profile for spenk.85 Click here to Send spenk.85 a Private Message Find more posts by spenk.85 Add spenk.85 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
arcieredighiaccio
.novellino.

User info:
Registered: Jun 2002
Posts: 8 (0.00 al dì)
Location: Paderno Dugnano
Corso:
Anno:
Time Online: 2:57:26 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Quindi dovrei mettere in una stringa tutti i toString creati nelle altre classi? E poi mando il return a quest'ultima?
Grazie comunque...

__________________
L'Arciere di Ghiaccio

07-02-2006 14:16
Click Here to See the Profile for arcieredighiaccio Click here to Send arcieredighiaccio a Private Message Find more posts by arcieredighiaccio Add arcieredighiaccio to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
spenk.85
.illuminato.

User info:
Registered: Nov 2005
Posts: 196 (0.03 al dì)
Location: Muggiò
Corso: Comunicazione Digitale
Anno: x
Time Online: 1 Day, 12:55:02: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

esatto

07-02-2006 15:06
Click Here to See the Profile for spenk.85 Click here to Send spenk.85 a Private Message Find more posts by spenk.85 Add spenk.85 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Crashman
.simpatizzante.

User info:
Registered: Jun 2005
Posts: 19 (0.00 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno: Primo
Time Online: 13:46:48 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by ARIEL
Corla manca tutta l'indentazione e poi la stampa della somma finale!

Ok, manca la stampa del valore finale, ma tutto il resto è giusto ;)

__________________
"Overcome the devils with a thing called love"
Msn: crashman86@hotmail.com
Futuro programmatore grafico :)

07-02-2006 16:07
Click Here to See the Profile for Crashman Click here to Send Crashman a Private Message Find more posts by Crashman Add Crashman to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
spenk.85
.illuminato.

User info:
Registered: Nov 2005
Posts: 196 (0.03 al dì)
Location: Muggiò
Corso: Comunicazione Digitale
Anno: x
Time Online: 1 Day, 12:55:02: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

l'indentazione è giusta?

07-02-2006 16:26
Click Here to See the Profile for spenk.85 Click here to Send spenk.85 a Private Message Find more posts by spenk.85 Add spenk.85 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Gerry
.novellino.

User info:
Registered: Feb 2006
Posts: 3 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 5:54:59 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ciao ragazzi passavo di qua e ho letto l'indentazione fornita da spenk.85 qualche giorno fa, volevo dire ke secondo me l'indentazione corretta è la seguente:
[alessio@Linux classes]$ java Programma 10 5
DECLARE s;
DECLARE arg1;
arg1 = 10;
IF (arg1<=0)
PRINT "Primo argomento invalido";
ELSE
DECLARE arg2;
arg2 = 5; /*1*/
IF (arg2<=0) /*2*/
PRINT "Secondo argomento invalido";
ELSE /*3*/
WHILE (arg1!=0)
arg1 -= 1;
s += 1;
WHILE (arg2!=0)
arg2 -= 1;
s += 1;
PRINT s;

15 (naturalemnte questo cambia a secondo dei dati inseriti)

/*1*/=questo lo deve fare solo se ha dichiarato arg2

/*2*/=nn ha alcun senso controllare arg2 se nn è stato dichiarato

/*3*/=questo else deve essere svolto solo se sia arg1,ke arg2 sono >0;

se pensate che il mio ragionamento faccia delle grinze scrivete(anke perchè io ho fatto cosi)
ciao Gerry.

07-02-2006 16:51
Click Here to See the Profile for Gerry Click here to Send Gerry a Private Message Find more posts by Gerry Add Gerry to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Gerry
.novellino.

User info:
Registered: Feb 2006
Posts: 3 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 5:54:59 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

scusate nel copiare il testo mi sono accorto, che nn ha indentato affatto, cmq vi dico ke sono d'accordo con spank.85 fino a "DECLARE arg2", poi secondo me tutte le successive istruzioni appartengono all'else che precede "DECLARE arg2", quindi i successivi if ed else sono all'interno di esso.

NN so se sono stato chiaro, se nn avete capito scrivete
gerry

07-02-2006 17:02
Click Here to See the Profile for Gerry Click here to Send Gerry a Private Message Find more posts by Gerry Add Gerry to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Crashman
.simpatizzante.

User info:
Registered: Jun 2005
Posts: 19 (0.00 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno: Primo
Time Online: 13:46:48 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Crashman
Ok, manca la stampa del valore finale, ma tutto il resto è giusto ;)

:)

__________________
"Overcome the devils with a thing called love"
Msn: crashman86@hotmail.com
Futuro programmatore grafico :)

07-02-2006 17:10
Click Here to See the Profile for Crashman Click here to Send Crashman a Private Message Find more posts by Crashman Add Crashman to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lyanne
-perenne paranoia-

User info:
Registered: Oct 2005
Posts: 277 (0.04 al dì)
Location: Milano
Corso: Comunicatio
Anno: 3
Time Online: 3 Days, 5:08:44 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

:(
Perché??????

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at myLanguage.Test.main(Test.java:9)

quando lancio il programma di malchiodi mi dà questo messaggio... perché????:(

__________________
some photos of mine

07-02-2006 21:47
Click Here to See the Profile for Lyanne Click Here to See the Blog of Lyanne Click here to Send Lyanne a Private Message Find more posts by Lyanne Add Lyanne to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 22:10.    Post New Thread    Post A Reply
Pages (6): « 1 [2] 3 4 5 6 »   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.089 seconds (63.75% PHP - 36.25% MySQL) con 23 query.