R. Ching MIS Department California State University, Sacramento Week 12 Object-Oriented Programming Base and Derived Classes Lab Exercise
R. Ching MIS Department California State University, Sacramento Steps Create the classCreate the class Define the propertiesDefine the properties Create the accessor methodsCreate the accessor methods Create the constructorsCreate the constructors Create the formCreate the form Create the derived classesCreate the derived classes
R. Ching MIS Department California State University, Sacramento Add the class from the Project menu
R. Ching MIS Department California State University, Sacramento Assign a name to the class
R. Ching MIS Department California State University, Sacramento Define the class’ properties
R. Ching MIS Department California State University, Sacramento Accessor Methdods Add the accessor methods Tests the length of the character string
R. Ching MIS Department California State University, Sacramento
Constructors Add the constructors
R. Ching MIS Department California State University, Sacramento Create the Form Text boxes Combo box Text box Group box Radio buttons Buttons List box Labels
R. Ching MIS Department California State University, Sacramento Add the Subclasses
R. Ching MIS Department California State University, Sacramento
Constructor (the same for each class)
R. Ching MIS Department California State University, Sacramento Super and Subclasses
R. Ching MIS Department California State University, Sacramento Define the Objects Objects to classes Object Class
R. Ching MIS Department California State University, Sacramento Button Clicked Find the checked radio button Instantiate the object
R. Ching MIS Department California State University, Sacramento
Adding Shared Variables
R. Ching MIS Department California State University, Sacramento Read-only property procedures
R. Ching MIS Department California State University, Sacramento Temporary Fix
R. Ching MIS Department California State University, Sacramento When the user selects an item in the list box, the corresponding counts appear in the labels
R. Ching MIS Department California State University, Sacramento Test for the Selected Item
R. Ching MIS Department California State University, Sacramento