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 N - Z > Programmazione > [SECONDO PROGETTINO] grossi
Pages (2): [1] 2 »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
wose82
.precettore.

User info:
Registered: Jun 2005
Posts: 86 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 1 Day, 1:44:00: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
secondo progettino/appello grossi

qualcuno ha un'idea su come si possa cominciare questo progetto??a me sembra abbastanza difficile...

19-01-2006 20:27
Click Here to See the Profile for wose82 Click here to Send wose82 a Private Message Find more posts by wose82 Add wose82 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
bog86
.consigliere.

User info:
Registered: Jan 2006
Posts: 117 (0.02 al dì)
Location:
Corso: Informatica
Anno: 3
Time Online: 1 Day, 23:03:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Unhappy

Io pensavo di far qualcosa del genere: 1) Leggo il file con uno stream cn buffer 2) Metto qualcona in uno stack 3)Stampo a video cn un metodo print() 4)scrivo i metodi richiesti cn relative eccezioni 5) Implemento l'interfaccia...
Xò sono in alto mare... Basterà lo stack o servira qualche altro tipo di sequenza?? come faccio a legger e distinguer i vari tag?? help.... :? :sad:

21-01-2006 19:29
Click Here to See the Profile for bog86 Click here to Send bog86 a Private Message Find more posts by bog86 Add bog86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
wose82
.precettore.

User info:
Registered: Jun 2005
Posts: 86 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 1 Day, 1:44:00: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

io insieme ad altri compagni in 2 gg abbiamo concluso poco...penso bisogna usare una lista di stack in cui suddividere le 3 parti del menu...però è un gran casino....

24-01-2006 15:59
Click Here to See the Profile for wose82 Click here to Send wose82 a Private Message Find more posts by wose82 Add wose82 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
NoWhereMan
.illuminato.

User info:
Registered: Jul 2003
Posts: 222 (0.03 al dì)
Location: Segrate (MI)
Corso: Dottorato in Informatica
Anno:
Time Online: 1 Day, 21:56:46 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Sapete tradurre questa frase?
/**
* Interfaccia che rappresenta un menu come collezione di comandi (voci di
* menu), oppure singole voci inserite in un menu.

28-01-2006 09:56
Click Here to See the Profile for NoWhereMan Click here to Send NoWhereMan a Private Message Visit NoWhereMan's homepage! Find more posts by NoWhereMan Add NoWhereMan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
zizzagnaman
.simpatizzante.

User info:
Registered: Oct 2005
Posts: 16 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 0:58:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

A me sembra un pò un casino, cmq dopo una mattinata di scervellamento credo di esserci vicino:

si legge il file riga x riga. se si incontra il tag menu si crea un nuovo oggetto menu, che contiene come campi id nome skey listItem.
dopo aver creato l'oggetto menu viene messo in un altra lista che contiene tutti i menu.
Poi vengono letti tutti i comandi e vengono emssi nella lista degli item dell'oggetto appena pushato.
Non l'ho ancora scritto cmq.
Avete qualche idea?

29-01-2006 15:59
Click Here to See the Profile for zizzagnaman Click here to Send zizzagnaman a Private Message Find more posts by zizzagnaman Add zizzagnaman to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
bog86
.consigliere.

User info:
Registered: Jan 2006
Posts: 117 (0.02 al dì)
Location:
Corso: Informatica
Anno: 3
Time Online: 1 Day, 23:03:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Penso anch'io che sia come dici tu, ma come fai a riconoscere i tag? con lo StringTokenizer non mi sembra possibile!?! Che sbatti, x sto progetto non passerò l'esame...

29-01-2006 16:05
Click Here to See the Profile for bog86 Click here to Send bog86 a Private Message Find more posts by bog86 Add bog86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
zizzagnaman
.simpatizzante.

User info:
Registered: Oct 2005
Posts: 16 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 0:58:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Tranquillo, io ho appena provato String tokenizer.
basta che fai qlc del genere:

linea è una String e in è un FileInputManager, tk è String



linea=in.readline;
while(linea!=null){
Stringtokenizer stk = new stringtokenizer(linea, "\"><\t= ");
while(stk.hasMoreToken()){
tk=stk.nextToken();
system.out.println(tk);
}

Non sò se è compilabile (i src del progetto li ho sull'altro pc).
Cmq questo ti restituisce ad esempio:

menubar
menu
name
File
skey
Alt+F
ecc.....

insomma, già una bella comodità
se becchi menu sai che inizia un menu
sai che dopo name c'è il nome del menu
se che se c'è skey dopo viene l'attributo
si può già iniziare a riempire un oggetto
menu.name=........
menu.skey=.......

ecc.........

allora ricapitolando:
stringtokenizer su tutto il file
ci vuole una lista di menu (si può chiamare menubar ed è una lista
-o coda o stack o quell oche vuoi, non importa tanto non è una struttura dinamica, non cambia nel tempo- di oggetti "menu");
Ogni oggetto menu contiene nome, skey(facoltativo) e una lista
di "comandi" (che sono gli <item> ); Bisogna stare attenti, se si becca un tag <menu> dentro la lista degli item comunque bisogna salvare l'item (ad es.barra degli strumenti è un menu, ma cmq ci serve l'oggetto barra degl istrumenti come comando di "visualizza").
Una volta progettate bene le classi e le liste resta di difficile il riconoscere quando inizia e finsice un menu, diventa solo una roba pallosa.
Cmq attenzione anche ad un altra cosa
ad es "Barra degli strumenti" viene presa come 3 token "barra" "degli" "strumenti"
Dovi metterli insieme in una stringa sola (butti tutto in una stringa fin quando non becchi un tag "menu" o "skey" o "sep" o "item" ...)
E' una roba pallosa è difficile (per me).
Diamoci una mano che ci leviamo stà rottura di c**o

29-01-2006 17:28
Click Here to See the Profile for zizzagnaman Click here to Send zizzagnaman a Private Message Find more posts by zizzagnaman Add zizzagnaman to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
NoWhereMan
.illuminato.

User info:
Registered: Jul 2003
Posts: 222 (0.03 al dì)
Location: Segrate (MI)
Corso: Dottorato in Informatica
Anno:
Time Online: 1 Day, 21:56:46 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ma se hai un item?
<item skey="ctrl+t">testo</item>
Concludi arbitrariamente che se la stringa non è né menu, né item, né skey, né name, allora tutto il testo è il nome del menu?
E poi, sì, c'è il fatto che tokenizzi anche tutto il testo spaziato...
che rottura, usare il parser XML era molto meglio...

29-01-2006 18:54
Click Here to See the Profile for NoWhereMan Click here to Send NoWhereMan a Private Message Visit NoWhereMan's homepage! Find more posts by NoWhereMan Add NoWhereMan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
bog86
.consigliere.

User info:
Registered: Jan 2006
Posts: 117 (0.02 al dì)
Location:
Corso: Informatica
Anno: 3
Time Online: 1 Day, 23:03:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

grazie zizzagnaman, mi hai illuminato la retta via... ora mi metto al lavoro se riesco a combinare qualcosa di utile ti faccio sapere

29-01-2006 19:25
Click Here to See the Profile for bog86 Click here to Send bog86 a Private Message Find more posts by bog86 Add bog86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
zizzagnaman
.simpatizzante.

User info:
Registered: Oct 2005
Posts: 16 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 0:58:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Credo di esserci quasi.
Ho passato la mattina a fare prove con la classe Vector.
Vi consiglio di dare un occhiata a lez06.pdf, è una delel dispense che
si trovano sul sito. Credo che usare Vector sia la cosa più facile.

Ho creato un vettore (Vector eh) "globale" che contiene tutti i menu (oggetti di tipo "menu").
Ogni oggetto "menu" a sua volta contiene un Vector di oggetti "item".
Facile e pulito, sol oche non si usano le pile come consiglia il prof.

Non sò se avete notato ma c'è un piccolo errore ortografico nel file menu.xml (un "key" al posto di un "skey").
Correggetelo altrimenti l'output impazzisce.

Ohi, fatemi sapere eh

30-01-2006 11:37
Click Here to See the Profile for zizzagnaman Click here to Send zizzagnaman a Private Message Find more posts by zizzagnaman Add zizzagnaman to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
NoWhereMan
.illuminato.

User info:
Registered: Jul 2003
Posts: 222 (0.03 al dì)
Location: Segrate (MI)
Corso: Dottorato in Informatica
Anno:
Time Online: 1 Day, 21:56:46 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ho fatto sostanzialmente come te (usando un arraylist), ho anche messo delle proprietà aggiuntive, ad esempio se i menu hanno genitori (cioè si trovano dentro altri menu). Inoltre ho reso iterabili gli oggetti di tipo menu (che che estendono xmlmenuitem e contengono xmlmenuitme oppure altri xmlmenu)

ciao

30-01-2006 11:58
Click Here to See the Profile for NoWhereMan Click here to Send NoWhereMan a Private Message Visit NoWhereMan's homepage! Find more posts by NoWhereMan Add NoWhereMan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
number15
.grande:maestro.

User info:
Registered: Nov 2005
Posts: 652 (0.10 al dì)
Location:
Corso:
Anno:
Time Online: 121 Days, 13:57:11 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Sul forum il prof Grossi ha messo il form per la consegna; ha parte il fatto che dice che è già scaduto il termine, ma tra parentesi dice (chiusura mercoledì 1° febbraio, ore 12.00): abbiamo quindi mezza giornata in più?

__________________
Portale segnalazioni marchi-negozi di abbigliamento
http://www.ovojo.com

30-01-2006 12:08
Click Here to See the Profile for number15 Click here to Send number15 a Private Message Find more posts by number15 Add number15 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
NoWhereMan
.illuminato.

User info:
Registered: Jul 2003
Posts: 222 (0.03 al dì)
Location: Segrate (MI)
Corso: Dottorato in Informatica
Anno:
Time Online: 1 Day, 21:56:46 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

sembra di sì...

30-01-2006 12:26
Click Here to See the Profile for NoWhereMan Click here to Send NoWhereMan a Private Message Visit NoWhereMan's homepage! Find more posts by NoWhereMan Add NoWhereMan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
wose82
.precettore.

User info:
Registered: Jun 2005
Posts: 86 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 1 Day, 1:44:00: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

usciti i voti....insuff :-( ma farà la media col primo...o ci boccia tutti???meno i 15 che l'hanno fatto bene....

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

User info:
Registered: Jan 2006
Posts: 117 (0.02 al dì)
Location:
Corso: Informatica
Anno: 3
Time Online: 1 Day, 23:03:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

io manco l'ho mandato... complimenti ai 15 geni che l'hanno completato!!! (esclusa la % di furbi che se lo son fatti fare) Cmq tra una settimana ci sarà un'altro progettino

07-02-2006 19:06
Click Here to See the Profile for bog86 Click here to Send bog86 a Private Message Find more posts by bog86 Add bog86 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:45.    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.045 seconds (82.56% PHP - 17.44% MySQL) con 27 query.