microsoft visual basic 2015 chapter 11

47 99 0
 microsoft  visual basic 2015 chapter 11

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Microsoft Visual Basic 2015 CHAPTER ELEVEN Multiple Classes and Inheritance 11 Objectives ►Use the TabIndex Property ►Edit input, including MaskedTextBox,TextBox, and ComboBox objects ►Describe the three-tiered program structure ►Understand a class ►Create a class Chapter 11: Multiple Classes and Inheritance © 2016 Cengage Learning® May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 11 Objectives ►Instantiate an object ►Pass arguments when instantiating an object ►Write a class constructor ►Call a procedure in a separate class Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 11 Objectives ►Code a base class and a subclass to incorporate inheritance ►Call procedures found in a base class and a subclass ►Write overridable and overrides procedures ►Create and write a comma-delimited text file Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 11 Use the TabIndex Property in the User Interface ► Select the object that will be selected when program execution begins Scroll in the Properties window until the TabIndex property is visible and then double-tap or double-click in the right column of the TabIndex property ► Type and then press the ENTER key ► Select the object which should be selected when the user presses the TAB key Double-tap or double-click the right column of the TabIndex property for the object, type and then press the ENTER key Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 11 Use the TabIndex Property in the User Interface Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 11 Editing Input Data ► Student ID: The Student ID object is a masked text box, and the mask is for the Social Security number in the same layout, so the mask ensures that the user can enter only numbers However, the Social Security mask does not ensure that the user enters all nine numbers Therefore, a check must be included in the program to require the user to enter all nine numeric digits ► Student Name: The program must ensure that the user enters characters in this TextBox object In addition, spaces cannot be entered instead of actual alphabetic characters ► Number of Units: The user must enter a numeric value from through 24 for the number of units the student is taking ► Major: The user must select a major from the list in the Major ComboBox object Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 11 Editing Input Data Chapter 11: Multiple Classes and Inheritance © 2016 Cengage Learning® May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 11 Program Structure Using Classes ►The concept of separating processing and hiding data within specific classes is called encapsulation ►When developing programs with multiple classes, a starting point for determining what classes should appear in a program is the three-tier program structure Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 11 Program Structure Using Classes ►The presentation tier contains the classes that display information for the user and accept user input ►The business tier contains the logic and calculations that must occur in order to fulfill the requirements of the program ►The persistence tier, sometimes called the data access tier, contains the code required to read and write data from permanent storage Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 10 11 Comma-Delimited Text File Chapter 11: Multiple Classes and Inheritance © 2016 Cengage Learning® May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 33 11 Comma-Delimited Text File Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 34 11 Program Design Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 35 11 Program Design Chapter 11: Multiple Classes and Inheritance © 2016 Cengage Learning® May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 36 11 Program Design Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 37 11 Event Planning Document Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 38 11 Event Planning Document Chapter 11: Multiple Classes and Inheritance © 2016 Cengage Learning® May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 39 11 Event Planning Document Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 40 11 Event Planning Document Chapter 11: Multiple Classes and Inheritance © 2016 Cengage Learning® May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 41 11 Event Planning Document Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 42 11 Event Planning Document Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 43 11 Summary ►Use the TabIndex Property ►Edit input, including MaskedTextBox,TextBox, and ComboBox objects ►Describe the three-tiered program structure ►Understand a class ►Create a class Chapter 11: Multiple Classes and Inheritance © 2016 Cengage Learning® May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 44 11 Summary ►Instantiate an object ►Pass arguments when instantiating an object ►Write a class constructor ►Call a procedure in a separate class Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 45 11 Summary ►Code a base class and a subclass to incorporate inheritance ►Call procedures found in a base class and a subclass ►Write overridable and overrides procedures ►Create and write a comma-delimited text file Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 46 Microsoft Visual Basic 2015 CHAPTER ELEVEN COMPLETE Multiple Classes and Inheritance ... class to inherit attributes and procedures from another class Chapter 11: Multiple Classes and Inheritance 19 11 Inheritance Chapter 11: Multiple Classes and Inheritance © 2016 Cengage Learning®... Costs File Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 11 11 Creating... ENTER key Chapter 11: Multiple Classes and Inheritance â 2016 Cengage Learningđ May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part 11 Use the

Ngày đăng: 06/02/2018, 10:06

Mục lục

    Use the TabIndex Property in the User Interface

    Use the TabIndex Property in the User Interface

    Program Structure Using Classes

    Program Structure Using Classes

    Instantiating a Class and Class Communication

    Constructors in New Instantiated Classes

    Passing Arguments when Instantiating an Object

    Passing Arguments when Instantiating an Object

    Calling a Procedure in a Separate Class

    Call a Named Procedure in the Base Class

Tài liệu cùng người dùng

  • Đang cập nhật ...