Jäsenen ja harrastusten välinen yhteistyö

# vastuut

Vastuut

  • Jasen ei tiedä harrastuksista
  • Harrastus tietää jäsenen tunnusnumeron, mutta ei jäseniä
  • Harrastukset osaa etsiä tietyn jäsenen kaikki harrastukset
  • Kerho osaa pyytää Harrastukset-luokan oliota etsimään tietyn jäsenen harrastukset
  • KerhoGUIController pyytää Kerhoa tekemään hommia.
# vaihe5

Vaihe 5

Tilapäisesti tiedot tulostetaan keskiosaan vaihdettuun TextAreaan:

Harrastus

Harrastus.java

File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe5/src/kerho/Harrastus.java

...

File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe5/src/kerho/Harrastus.java

Harrastukset

Harrastukset.java

File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe5/src/kerho/Harrastukset.java
File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe5/src/kerho/Harrastukset.java
File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe5/src/kerho/Harrastukset.java

Kerho

Kerho.java

File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe5/src/kerho/Kerho.java
File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe5/src/kerho/Kerho.java
File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe5/src/kerho/Kerho.java

KerhoGUIController

File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe5/src/fxKerho/KerhoGUIController.java

Esimerkiksi Jasenen tulostamista varten haetaan jäsenen harrastukset

File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe5/src/fxKerho/KerhoGUIController.java

Vaihe 7

Jäsenen tietojen näyttämiseksi täytetään jäsenen tiedot omiin kenttiinsä ja sitten näytetään harrastuksen tiedot taulukkoon:

KerhoGuiController

File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe7.1.3/src/fxKerho/KerhoGUIController.java

JasenDialogController, vaihe 7.1.3

File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe7.1.3/src/fxKerho/JasenDialogController.java

Tässä vaiheessa näyttämiseen käyetään vielä get-metodeja eikä niitä ole jaksettu kirjoittaa kaikille kentille. Yleisemmästä ideasta lue lisää Tiedonsyöttö, Kentät indeksoidusti.

JasenDialogController.java, Vaihe 7.2

File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe7.2/src/fxKerho/JasenDialogController.java

Yhden jäsenen harrastuksen näyttäminen:

KerhoGuiController

File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe7.1.3/src/fxKerho/KerhoGUIController.java

Harrastuksen lisääminen

KerhoGuiController 7.1.3

File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe7.1.3/src/fxKerho/KerhoGUIController.java

Myohemmin kun harrastusta voi muokata, tämä tehdään

KerhoGuiController vaihe 7.4

File not found https://gitlab.jyu.fi/tie/ohj2/kerhoja/kerho20/kerho8/raw/vaihe7.4/src/fxKerho/KerhoGUIController.java

Tämän voisi viedä vielä pidemmällekin niin, että jäsenten tunnusnumeroista ei tarvitsisi tietää mitään:

340    public void uusiHarrastus() {
341        if ( jasenKohdalla == null ) return;
342        Harrastus harrastus = kerho.luoUusiHarrastus(jasenKohdalla);
...

These are the current permissions for this document; please modify if needed. You can always modify these permissions from the manage page.