Professional Documents
Culture Documents
Object-Oriented Programming
using C++ and Java
Yung-Hsiang Lu
yunglu@purdue.edu
similar to QWidget
Events
Action
Action Performed
Events
Change
State Changed
Events
Mouse Motion
MouseMoved
Yung-Hsiang Lu
yunglu@purdue.edu
1. qmake -project
2. qmake
3. make
add a button
add a label
add a slider
Yung-Hsiang Lu
yunglu@purdue.edu
Array
Yung-Hsiang Lu
yunglu@purdue.edu
YHL Array 1
Array
Java C++
YHL Array 2
Java Array
YHL Array 3
Array of int
YHL Array 4
YHL Array 5
Array of Objects
YHL Array 6
YHL Array 7
YHL Array 8
Person [] personArray = new Person[8];
YHL Array 10
Array of int
YHL Array 11
YHL Array 12
Array of Objects
YHL Array 13
YHL Array 14
YHL Array 15
YHL Array 16
YHL Array 17
Person * * personArray = new Person* [arraySize];
YHL Array 19
Java
YHL Array 20
YHL Array 21
YHL Array 22
C++
YHL Array 23
need another attribute to store the
number of elements in the array
YHL Array 24
YHL Array 25
YHL Array 26
delete without []
(because it is not an array)
YHL Array 27
Self Test
YHL Array 28