Presentation is loading. Please wait.

Presentation is loading. Please wait.

Classes CSC 265 (Blum).

Similar presentations


Presentation on theme: "Classes CSC 265 (Blum)."— Presentation transcript:

1 Classes CSC 265 (Blum)

2 Project/Add Class CSC 265 (Blum)

3 Add New Item Dialog Box CSC 265 (Blum) Name the file

4 Starting the class: Declaring the attributes
CSC 265 (Blum)

5 An overloaded constructor
CSC 265 (Blum)

6 An overloaded constructor (Cont.)
CSC 265 (Blum)

7 Property: Set and Get CSC 265 (Blum)

8 Sets often include validation code
CSC 265 (Blum)

9 Public Method CSC 265 (Blum)

10 Build class CSC 265 (Blum)

11 Declaring a (global) Person object
Declaring a (global) Person object. Note that it appears in the drop-down list CSC 265 (Blum)

12 Use different constructor based on information available
CSC 265 (Blum)

13 Using the property of the object (actually the get method thereof)
Using the property of the object (actually the get method thereof). Note the drop-down list. CSC 265 (Blum)

14 Writing myPerson’s data to a label
CSC 265 (Blum)

15 Parameter-less constructor
CSC 265 (Blum)

16 One-parameter constructor
CSC 265 (Blum)

17 Two-parameter constructor
CSC 265 (Blum)

18 State Class Example: Array of Objects
CSC 265 (Blum)

19 Another Example: The State Class
CSC 265 (Blum)

20 State Property Sets and Gets
CSC 265 (Blum)

21 State Property Sets and Gets (Cont.)
CSC 265 (Blum)

22 State Property Sets and Gets (Cont.)
CSC 265 (Blum)

23 State Property Sets and Gets (Cont.)
CSC 265 (Blum)

24 Declare array of state objects
CSC 265 (Blum)

25 Read, trim and parse CSC 265 (Blum)

26 Instantiate array of objects, parse individual lines, instantiate individual object
CSC 265 (Blum)

27 Set properties of state objects
CSC 265 (Blum)

28 Use object gets to display values in textboxes
CSC 265 (Blum)

29 Clear Textboxes when new item selected from list
CSC 265 (Blum)


Download ppt "Classes CSC 265 (Blum)."

Similar presentations


Ads by Google