Dr. Javier Gonzalez-Sanchez
[email protected]
www.javiergs.info
o
ffi
ce: 14 -227
CSC 305
Individual Software Design and Development
Lecture 21. Final Project
To a draft of Standard Concepts (Patterns)
11
wrapper2
Main wrapper1
Factory
decoration
Envelope
Box
Gift
wrapper3
ball
Supervisor
Is big > 10, box Is small < 5, envelop
Slide 12
Slide 12 text
Final Project
Slide 13
Slide 13 text
Step 1: Click and draw a square; it has a name
13
Name01
Slide 14
Slide 14 text
Step 2: Change name to the square
14
Name01
Student
Slide 15
Slide 15 text
Step 3: Allow Drag and Drop
15
Student
Slide 16
Slide 16 text
Step 4: Allow Drag and Drop
16
Student
Slide 17
Slide 17 text
Step 5: Right click to display a popup menu
17
Student
Slide 18
Slide 18 text
Step 5: Decorate the box acording with the selection
18
Student
👀
Slide 19
Slide 19 text
Create your own decorations
Make them intituive.
Text is Fine but Images or Draws are encouraged
Several decorations can be applied to the same box
To Do
Slide 20
Slide 20 text
Step 5: Decorate the box acording with the selection
20
Student
Cat
Store
Food
👀
O
P
F
👀
O
Slide 21
Slide 21 text
Step 6: Allow me to connect decorations
21
Student
Cat
Store
Food
👀
O
P
F
👀
O
Slide 22
Slide 22 text
Step 7: Allow me to connect boxes (classes)
File Box Connector
Agreg
a
tion
Composition
Associ
a
tion
Inherit
a
nce
Re
a
liz
a
tion
Slide 23
Slide 23 text
Step 7: Allow me to connect boxes (classes)
23
Student
Cat
Store
Food
👀
O
P
F
👀
O
Main
Person
Slide 24
Slide 24 text
Tip: This code can help
24
https://github.com/CSC3100/Patterns/tree/main/ChallengeCities
Slide 25
Slide 25 text
The better the graphics the best
BUT,
Ok, make it functional and that is enough
To Do
Slide 26
Slide 26 text
Step 8: JTabbedPane
26
File Box Connector
Slide 27
Slide 27 text
Step 8: JTabbedPane
27
File Box Connector
Student
Cat
Store
Food
👀
O
P
F
👀
O
Main
Person
Slide 28
Slide 28 text
Step 9: Generate Text (Code in Java)
File Box Connector
Agreg
a
tion
Composition
Associ
a
tion
Inherit
a
nce
Re
a
liz
a
tion
Tools
Run
Slide 29
Slide 29 text
Step 9: Generate Text (Code in Java) 8: JTabbedPane
29
File Box Connector
Slide 30
Slide 30 text
Step 9: Generate Text (Code in Java)
30
File Box Connector
public class Cat
C
a
t
O 👀
}
{
implements PropertyChangeListener
extends PropertyChangeSupport
Slide 31
Slide 31 text
Step 9: Generate Text (Code in Java)
31
File Box Connector
public class Cat
extends PropertyChangeSupport
implements PropertyChangeListener
{
public Cat()
super(new Object());
}
@Override
public void propertyChange
(PropertyChangeEvent e) {
}
C
a
t
O 👀
}
Slide 32
Slide 32 text
What code (classes, interfaces, methods,
instructions) can be automatically generated for
each pattern?
To Do
Slide 33
Slide 33 text
Step 10: File Menu: New, Save, Load
File Box Connector
Agreg
a
tion
Composition
Associ
a
tion
Inherit
a
nce
Re
a
liz
a
tion
Tools
Run
New…
Open…
S
a
ve As…
S
a
ve
Help
About
Slide 34
Slide 34 text
What are you going to save to be able to reload both
digram and code?
To Do
Slide 35
Slide 35 text
Step : About dialog box
File Box Connector
Agreg
a
tion
Composition
Associ
a
tion
Inherit
a
nce
Re
a
liz
a
tion
Tools
Run
New…
Open…
S
a
ve As…
S
a
ve
Help
About
Slide 36
Slide 36 text
Questions
36
Slide 37
Slide 37 text
CSC 305 Individual Software Design and Development
Javier Gonzalez-Sanchez, Ph.D.
[email protected]
Summer 2024
Copyright. These slides can only be used as study material for the class CSC305 at Cal Poly.
They cannot be distributed or used for another purpose.