Your SlideShare is downloading. ×
Implementing Object-oriented Programming inVisual Basic .NETObjectivesIn this lesson, you will learn to: Identify the adva...
Implementing Object-oriented Programming inVisual Basic .NETObjectives (Contd.)Declare and import namespacesCreate an inhe...
Implementing Object-oriented Programming inVisual Basic .NETObject-orientation in Visual Basic .NET Visual Basic .NET:    ...
Implementing Object-oriented Programming inVisual Basic .NETClasses and ObjectsClass     Is a conceptual representation of...
Implementing Object-oriented Programming inVisual Basic .NETAdvantages of Using Classes and Objects Maintenance of code by...
Implementing Object-oriented Programming inVisual Basic .NETStructure Is a generalization of a user-defined data type (UDT...
Implementing Object-oriented Programming inVisual Basic .NETStructure (Contd.) You can specify the accessibility of the da...
Implementing Object-oriented Programming inVisual Basic .NETStructure (Contd.)Storing and accessing data within/from a str...
Implementing Object-oriented Programming inVisual Basic .NETClasses Vs. StructureA few similarities between a class and a ...
Implementing Object-oriented Programming inVisual Basic .NETClasses Vs. Structure (Contd.)A few dissimilarities between a ...
Implementing Object-oriented Programming inVisual Basic .NET Abstract ClassContains the skeleton of the methods that deriv...
Implementing Object-oriented Programming inVisual Basic .NETAbstract Class (Contd.) You can create an abstract class by us...
Implementing Object-oriented Programming inVisual Basic .NETInterfaceCan contain only the declaration of members such aspr...
Implementing Object-oriented Programming inVisual Basic .NETInterface (Contd.)Statements are Public by default.Can inherit...
Implementing Object-oriented Programming inVisual Basic .NETDifferences Between Interfaces and Abstract ClassesInterfaces ...
Implementing Object-oriented Programming inVisual Basic .NETAssemblies Consist of a single or multiple executable and reso...
Implementing Object-oriented Programming inVisual Basic .NETAssemblies (Contd.) The application hierarchy in Visual Basic ...
Implementing Object-oriented Programming inVisual Basic .NETAssemblies (Contd.) Consist of manifest, module, and type. Man...
Implementing Object-oriented Programming inVisual Basic .NETAssemblies (Contd.) Module is either a DLL or EXE. It contains...
Implementing Object-oriented Programming inVisual Basic .NETJust a Minute…2. Why is a structure called a composite data ty...
Implementing Object-oriented Programming inVisual Basic .NETProblem Statement 3.D.1The call centers at Diaz Telecommunicat...
Implementing Object-oriented Programming inVisual Basic .NETTask ListIdentify the data that needs to be captured.Identify ...
Implementing Object-oriented Programming inVisual Basic .NETTask List (Contd.)Write the code to instantiate the class.Writ...
Implementing Object-oriented Programming inVisual Basic .NETTask 1: Identify the data that needs to be captured.Result:As ...
Implementing Object-oriented Programming inVisual Basic .NETTask 2: Identify the type of user interface to be used.There a...
Implementing Object-oriented Programming inVisual Basic .NETTask 3: Identify the user interface components toaccept data.G...
Implementing Object-oriented Programming inVisual Basic .NETTask 3: Identify the user interface components toaccept data. ...
Implementing Object-oriented Programming inVisual Basic .NETTask 4: Identify the mechanism to store data inrelevant memory...
Implementing Object-oriented Programming inVisual Basic .NETTask 5: Identify the memory variables to storecustomer informa...
Implementing Object-oriented Programming inVisual Basic .NETTask 6: Perform appropriate steps to create the userinterface ...
Implementing Object-oriented Programming inVisual Basic .NETTask 8: Write the code to add the relevant membersto a class.T...
Implementing Object-oriented Programming inVisual Basic .NETShared Constructors Used to initialize the variables that are ...
Implementing Object-oriented Programming inVisual Basic .NETInstance Constructors Used to initialize variables that are de...
Implementing Object-oriented Programming inVisual Basic .NETDestructors Are special methods that are used to release an in...
Implementing Object-oriented Programming inVisual Basic .NETFinalize ( ) Destructor Is called from the class to which it b...
Implementing Object-oriented Programming inVisual Basic .NETDispose ( ) Destructor Is called to release a resource, such a...
Implementing Object-oriented Programming inVisual Basic .NETTask 10: Write the code to store and retrieve datafrom the cla...
Implementing Object-oriented Programming inVisual Basic .NETProblem Statement 3.D.2The call centers at Diaz Telecommunicat...
Implementing Object-oriented Programming inVisual Basic .NETTask List Identify the mechanism to provide a similar user int...
Implementing Object-oriented Programming inVisual Basic .NETTask List (Contd.)Add the additional user interface control, a...
Implementing Object-oriented Programming inVisual Basic .NETTask 1: Identify the mechanism to provide a similaruser interf...
Implementing Object-oriented Programming inVisual Basic .NETTask 2: Identify the user interface components toaccept data.R...
Implementing Object-oriented Programming inVisual Basic .NETTask 3: Identify the additional user interfacecontrols.Result:...
Implementing Object-oriented Programming inVisual Basic .NETTask 4: Create the user interface screen, asdesigned.Task 5: A...
Implementing Object-oriented Programming inVisual Basic .NETTask 9: Perform the tasks to display a similar userinterface.T...
Implementing Object-oriented Programming inVisual Basic .NETProblem Statement 3.P.1The call centers of Diaz Telecommunicat...
Implementing Object-oriented Programming inVisual Basic .NETSummaryIn this lesson, you learned that: Visual Basic .NET is ...
Implementing Object-oriented Programming inVisual Basic .NETSummary (Contd.)An assembly contains information necessary for...
Upcoming SlideShare
Loading in...5
×

Vb net xp_03

678

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
678
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Transcript of "Vb net xp_03"

  1. 1. Implementing Object-oriented Programming inVisual Basic .NETObjectivesIn this lesson, you will learn to: Identify the advantages of using classes and objects Identify the use of structures Identify the use of abstract classes in Visual Basic .NET Identify the use of interfaces Identify the differences between interfaces and abstract classes Identify the use of assemblies Identify the application hierarchy in Visual Basic .NET Create and instantiate a class©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 1 of 48
  2. 2. Implementing Object-oriented Programming inVisual Basic .NETObjectives (Contd.)Declare and import namespacesCreate an inherited form in Visual Basic .NET©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 2 of 48
  3. 3. Implementing Object-oriented Programming inVisual Basic .NETObject-orientation in Visual Basic .NET Visual Basic .NET: Supports the four pillars of object-oriented programming: ® Encapsulation ® Abstraction ® Inheritance ® Polymorphism Uses predefined classes provided by the .NET Framework. Allows you to create your own classes. Supports structures that enable you to create your own data type Data Adapter. Also has full support for interfaces. ©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 3 of 48
  4. 4. Implementing Object-oriented Programming inVisual Basic .NETClasses and ObjectsClass Is a conceptual representation of all the entities that share common attributes and behaviors. Defines the attributes and behaviors of all the instances of the class.Object Is an instance of a class. Has individual copy of the common attributes and share a common set of behaviors.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 4 of 48
  5. 5. Implementing Object-oriented Programming inVisual Basic .NETAdvantages of Using Classes and Objects Maintenance of code by introducing modularity. Encapsulation of internal complexities in code from end-users. Reuse of code across applications. Support for a single interface to implement multiple methods.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 5 of 48
  6. 6. Implementing Object-oriented Programming inVisual Basic .NETStructure Is a generalization of a user-defined data type (UDT). Is created when you want a single variable to hold multiple types of related data. Is declared by using the Structure and End Structure statements. Can also include procedures as its members. Supports event handling.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 6 of 48
  7. 7. Implementing Object-oriented Programming inVisual Basic .NETStructure (Contd.) You can specify the accessibility of the data members within a structure by using one of the following access modifiers: Public Protected Friend Protected Friend Private©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 7 of 48
  8. 8. Implementing Object-oriented Programming inVisual Basic .NETStructure (Contd.)Storing and accessing data within/from a structure: Is done by using the .(dot) notation. Example Dim ord1 As order_details ord1.Inv_no = I0001“ ord1.Ord_dt = #5/31/2001# If ord1.Inv_no = Then MsgBox(Please enter the Invoice number) End If©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 8 of 48
  9. 9. Implementing Object-oriented Programming inVisual Basic .NETClasses Vs. StructureA few similarities between a class and a structure are: Both can have members, including constructors, properties, constants, and events. Both can implement interfaces. Both can have shared constructors, with or without parameters.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 9 of 48
  10. 10. Implementing Object-oriented Programming inVisual Basic .NETClasses Vs. Structure (Contd.)A few dissimilarities between a class and a structure aregiven in the following table: Class Structure A class is inheritable from other existing A structure is not inheritable. classes. A class can have instance constructors A structure can have instance with or without parameters. constructors only if they take parameters. A class is a reference type. A structure is a value type. The members of a class can be The members of a structure cannot be initialized within the class declaration. initialized within the structure declaration.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 10 of 48
  11. 11. Implementing Object-oriented Programming inVisual Basic .NET Abstract ClassContains the skeleton of the methods that derived classes can implement. Example Public MustInherit Class EmployeeDetails Public MustOverride Sub Annual_Salary(ByVal m As Integer) End Class Public Class Emp_details Inherits EmployeeDetails Public Overrides Sub Annual_Salary(ByVal m As Integer) Write the implementation code here End Sub End Class©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 11 of 48
  12. 12. Implementing Object-oriented Programming inVisual Basic .NETAbstract Class (Contd.) You can create an abstract class by using the MustInherit keyword in the class definition. You can define a method in an abstract class using the MustOverride keyword. You must implement the method in derived classes using the Overrides keyword. If a derived class of an abstract class does not implement one of the abstract methods of the abstract base class, it also must be declared with MustInherit keyword as it also becomes an abstract class.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 12 of 48
  13. 13. Implementing Object-oriented Programming inVisual Basic .NETInterfaceCan contain only the declaration of members such asproperties, methods, and events.Enables you to separate the definition of objects from their implementation so that the objects can evolve without the risk of introducing incompatibility in existing applications.Is declared by using the Interface and End Interface statements. Example Interface Iorderdetails Property CustName() As String Sub UpdateCustStatus() Event Update_Complete() End Interface©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 13 of 48
  14. 14. Implementing Object-oriented Programming inVisual Basic .NETInterface (Contd.)Statements are Public by default.Can inherit members from an existing interface by using the Inherits statement. Example Interface Validate_Cust Sub Validate_Custname() End Interface Interface Iorderdetails Inherits Validate_Cust Property CustName() As String Sub UpdateCustStatus() Event Update_Complete() End Interface©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 14 of 48
  15. 15. Implementing Object-oriented Programming inVisual Basic .NETDifferences Between Interfaces and Abstract ClassesInterfaces represent the highest level of abstraction inobject-oriented programming because all the methods in an interface do not have any implementation.In contrast, the abstract classes that are created by using the MustInherit keyword might contain a methodthat has a body. ©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 15 of 48
  16. 16. Implementing Object-oriented Programming inVisual Basic .NETAssemblies Consist of a single or multiple executable and resource files that contain information necessary for deploying and maintaining the versions of an application. Enable users to use an application even when the application is not registered in the System Registry, since: Every assembly is self-describing through metadata. Every reference to a type is scoped by an assembly reference. .NET can automatically locate referenced assemblies. ©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 16 of 48
  17. 17. Implementing Object-oriented Programming inVisual Basic .NETAssemblies (Contd.) The application hierarchy in Visual Basic .NET is illustrated in the following figure:©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 17 of 48
  18. 18. Implementing Object-oriented Programming inVisual Basic .NETAssemblies (Contd.) Consist of manifest, module, and type. Manifest is the descriptor of the assembly. It contains information on: The name and version number of the assembly. Its interaction with other assemblies. The types exposed by the assembly. Security permissions required by the assembly. ©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 18 of 48
  19. 19. Implementing Object-oriented Programming inVisual Basic .NETAssemblies (Contd.) Module is either a DLL or EXE. It contains: Compiled code in intermediate languages. Metadata associated with the module. Optionally, the manifest for the assembly. Type in Visual Basic .NET can be a class or a structure that contain data and logic affecting the data.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 19 of 48
  20. 20. Implementing Object-oriented Programming inVisual Basic .NETJust a Minute…2. Why is a structure called a composite data type?3. Identify the syntactical error in the following declaration of an interface: Interface Iproductdetails Property ProductName() As String Sub UpdateCustStatus() Label1.Text=“This is a Sub Procedure to check the status of the product” End Sub Event Update_complete() End Interface3. How are interfaces different from abstract classes?©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 20 of 48
  21. 21. Implementing Object-oriented Programming inVisual Basic .NETProblem Statement 3.D.1The call centers at Diaz Telecommunications need to maintaincustomer information to respond to customer queries. Thedetails of the customers need to be accepted through agraphical interface. The customer information also needs to bestored in the relevant memory variables. The details of thecustomers essentially include customer id, customer’s firstname, customer’s last name, address, telephone number, andcustomer’s e-mail id.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 21 of 48
  22. 22. Implementing Object-oriented Programming inVisual Basic .NETTask ListIdentify the data that needs to be captured.Identify the type of user interface to be used.Identify the user interface components to accept data.Identify the mechanism to store data in the relevant memory variables.Identify the memory variables to store customer information.Perform appropriate steps to create the user interface screen, as designed.Add a class to the project.Write the code to add the relevant members to a class.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 22 of 48
  23. 23. Implementing Object-oriented Programming inVisual Basic .NETTask List (Contd.)Write the code to instantiate the class.Write the code to store and retrieve data from the class.Save the application.Run the application.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 23 of 48
  24. 24. Implementing Object-oriented Programming inVisual Basic .NETTask 1: Identify the data that needs to be captured.Result:As per the problem statement, the data that needs to becaptured is: Customer ID First Name Last Name Address Telephone number E-mail ID©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 24 of 48
  25. 25. Implementing Object-oriented Programming inVisual Basic .NETTask 2: Identify the type of user interface to be used.There are three types of user interfaces: Windows Forms Web Forms ConsoleResult:Since the requirement stated in the problem statement is for a graphical user interface, you will use Windows Formsas the user interface.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 25 of 48
  26. 26. Implementing Object-oriented Programming inVisual Basic .NETTask 3: Identify the user interface components toaccept data.Guidelines for designing a user interface: Identify the name and title of the form. Identify the controls required. Recommend suitable prefixes that you can use for various controls: Object Prefix Example Form frm frmCustomerdetail s Label lbl lblCustomerName TextBox txt txtCustomerName Button cmd cmdSave©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 26 of 48
  27. 27. Implementing Object-oriented Programming inVisual Basic .NETTask 3: Identify the user interface components toaccept data. (Contd.)Result:Based on the guidelines, set the form name asfrmCustomerdetails and the text, which is the title of theform, as Customer Details.To make a user-friendly interface, add label controls todisplay static text for the customer details: Customer ID,First Name, Last Name, Address, Telephone number, andEmail ID. Next, add text box controls to accept information for each customer detail. In addition, add two buttonsto save and retrieve the data stored for the customer.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 27 of 48
  28. 28. Implementing Object-oriented Programming inVisual Basic .NETTask 4: Identify the mechanism to store data inrelevant memory variables.In Visual Basic .NET, you can store data in relevantmemory variables by implementing the object‑orientedfeatures. The object-oriented features enable you to create a class that has member variables to store data duringdata processing.Result:Since the requirement stated in the problem statement is to store customer information in the relevant memoryvariables, a class called Customer needs to be createdthat will have member variables to store customerinformation.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 28 of 48
  29. 29. Implementing Object-oriented Programming inVisual Basic .NETTask 5: Identify the memory variables to storecustomer information.Result:Since the customer information is to be stored in themember variables of the Customer class, you need to add variables to the Customer class. Each membervariable of the Customer class should store a particulartype of customer detail. You must ensure that the datatype of a member variable matches the data type of thecustomer detail stored by the variables. Six membervariables need to be declared in the Customer class.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 29 of 48
  30. 30. Implementing Object-oriented Programming inVisual Basic .NETTask 6: Perform appropriate steps to create the userinterface screen, as designed.Task 7: Add a class to the project.Namespace Is a naming scheme that helps you organize the classes available in an application so that they can be easily found. Enables you to avoid name collisions. Is created using the Namespace keyword. Every project in Visual Basic .NET has a root namespace, which is set in the Property page of the project. You can use namespaces explicitly through direct addressing or implicitly through the Imports statement.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 30 of 48
  31. 31. Implementing Object-oriented Programming inVisual Basic .NETTask 8: Write the code to add the relevant membersto a class.Task 9: Write the code to instantiate the class.Object Lifetime The life of an object begins when an instance of a class is created using the New keyword. The life of an object ends after it goes out of scope or is set to Nothing and is released by the .NET Framework.Constructors Are of two types, shared constructors and instance constructors.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 31 of 48
  32. 32. Implementing Object-oriented Programming inVisual Basic .NETShared Constructors Used to initialize the variables that are declared with the Shared keyword. Have an implicit Public access. Will not run more than once during a single execution of a program. Example Public Class class1 Shared x As Integer Shared Sub New() x = 10 End Sub End Class©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 32 of 48
  33. 33. Implementing Object-oriented Programming inVisual Basic .NETInstance Constructors Used to initialize variables that are declared with Dim, Public, Private, Friend, Protected, and Protected Friend keywords. Allow access to shared variables. Example Public Class class1 Dim x As Integer Public Sub New() x = 10 End Sub End Class©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 33 of 48
  34. 34. Implementing Object-oriented Programming inVisual Basic .NETDestructors Are special methods that are used to release an instance of a class from memory. There are two types of destructors in Visual Basic .NET: Finalize( ) Dispose( )©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 34 of 48
  35. 35. Implementing Object-oriented Programming inVisual Basic .NETFinalize ( ) Destructor Is called from the class to which it belongs or from the derived classes. Is called after the last reference to an object is released from the memory. Is automatically invoked by the .NET Framework to destroy objects in the memory.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 35 of 48
  36. 36. Implementing Object-oriented Programming inVisual Basic .NETDispose ( ) Destructor Is called to release a resource, such as a database connection, as soon as the object using such a resource is no longer in use. Is not called automatically, and you must explicitly call it from a client application.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 36 of 48
  37. 37. Implementing Object-oriented Programming inVisual Basic .NETTask 10: Write the code to store and retrieve datafrom the class.Task 11: Save the application.Task 12: Run the application.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 37 of 48
  38. 38. Implementing Object-oriented Programming inVisual Basic .NETProblem Statement 3.D.2The call centers at Diaz Telecommunications need data entryforms to store information in the Customers, Orders, QueryHandling, Products, and Employees databases. Every dataentry form should have a similar user interface with the Resetand Exit buttons. Incorporate the interface for the Order detailsform.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 38 of 48
  39. 39. Implementing Object-oriented Programming inVisual Basic .NETTask List Identify the mechanism to provide a similar user interface. Identify the user interface components to accept data. Identify the additional user interface controls. Create the user interface screen, as designed. Add code for the controls. Perform the prerequisite task to implement the planned mechanism. Implement the mechanism, as planned.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 39 of 48
  40. 40. Implementing Object-oriented Programming inVisual Basic .NETTask List (Contd.)Add the additional user interface control, as planned.Perform the tasks to display a similar user interface.Add code for the inherited controls.Save the application.Run the application.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 40 of 48
  41. 41. Implementing Object-oriented Programming inVisual Basic .NETTask 1: Identify the mechanism to provide a similaruser interface.In Visual Basic .NET, you can create a base form in aproject and then create a form that inherits from the baseform.Result:Since the requirement stated in the problem statement is to create a similar user interface for all the data entry forms, you can create a base form that has the Reset and Exitbuttons on it. You can then inherit all the data entry formsfrom the base form.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 41 of 48
  42. 42. Implementing Object-oriented Programming inVisual Basic .NETTask 2: Identify the user interface components toaccept data.Result:Since all the data entry forms must have the Reset and Exit buttons, you need to design the user interface of thebase form with these two buttons. You also need to specifythe Text and Name properties of the form and the buttonson the form.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 42 of 48
  43. 43. Implementing Object-oriented Programming inVisual Basic .NETTask 3: Identify the additional user interfacecontrols.Result:Since the data entry forms for the Customers, Orders,Query Handling, Products, and Employees databases must have various controls to accept data from a user, youneed to identify additional controls that need to be includedin the derived forms. In the current scenario, you will onlycreate a base form with two buttons and inherit the form Order_details.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 43 of 48
  44. 44. Implementing Object-oriented Programming inVisual Basic .NETTask 4: Create the user interface screen, asdesigned.Task 5: Add code for the controls.Task 6: Perform the prerequisite task to implementthe planned mechanism.Task 7: Implement the mechanism, as planned.Task 8: Add the additional user interface control, asplanned.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 44 of 48
  45. 45. Implementing Object-oriented Programming inVisual Basic .NETTask 9: Perform the tasks to display a similar userinterface.Task 10: Add code for the inherited controls.Task 11: Save the application.Task 12: Run the application.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 45 of 48
  46. 46. Implementing Object-oriented Programming inVisual Basic .NETProblem Statement 3.P.1The call centers of Diaz Telecommunications need to havedata entry forms to store information in the Customers,Orders, Query Handling, Product, and Employees databases.Every data entry form should have a similar user interface withthe Add, Modify, Delete, Reset and Exit buttons. Incorporatethe interface for the Query Handling data entry form.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 46 of 48
  47. 47. Implementing Object-oriented Programming inVisual Basic .NETSummaryIn this lesson, you learned that: Visual Basic .NET is an object-oriented programming language. A structure is used to create user-defined data types. Data can be stored in and retrieved from a structure. Abstract classes are used to define the skeleton of the methods that the derived class can implement. Interfaces are inheritable in Visual Basic .NET. Classes can be added to a Visual Basic .NET project.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 47 of 48
  48. 48. Implementing Object-oriented Programming inVisual Basic .NETSummary (Contd.)An assembly contains information necessary for deploying and maintaining the versions of an application.An assembly consists of manifest, module, and type.An important advantage of using a namespace is the prevention of a name collision.Classes can be inherited in a Visual Basic .NET project.©NIIT Implementing Object-oriented Programming in VB .NET/Lesson 3/Slide 48 of 48

×