Visual%20Basic%20vs%20JAVA - PowerPoint PPT Presentation

About This Presentation
Title:

Visual%20Basic%20vs%20JAVA

Description:

VB version 2 introduced the OOPS. VB version 3,4 business orientation ... Picture.Property Let Visible. Ctrl 1. Ctrl 2. Ctrl 3. Early Binding. Property Let Visible ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 18
Provided by: open77
Category:
Tags: 20basic | 20java | 20vs | oops | pics | visual

less

Transcript and Presenter's Notes

Title: Visual%20Basic%20vs%20JAVA


1
Visual Basic vs JAVA
  • Namon Nuttayasakul
  • Myat Min

2
Introduction
  • Visual Basic is a software development system
    developed by Microsoft to support creating
    programs for the Windows operating systems

3
History of Visual Basic
  • VB version 1 a custom-control edition
  • VB version 2 introduced the OOPS
  • VB version 3,4 business orientation
  • VB version 5 is a big breakthrough of OOPS
  • VB version 6 the network version of VB.

4
VB as an OOPS
  • OOPS (Object Oriented Programming Systems)
  • Microsofts object Basic
  • Visual Basic for Application (VBA)

5
Object
  • A data type with intelligence.
  • An example of object is
  • Spread Sheet

6
Creating an object in VB
  • General process to create object variable
  • Create an object variable (Dim).
  • Allocate an object in memory with New or
    CreateObject , and then assign it to the object
    variable.

7
Creating an object in VB
ObjectVariable
?
Create an object variable
Dim ObjName As Object
8
Creating an object
Object of type myClass
ObjVariable
Allocate an object in memory with New
Set ObjVariable New myClass
9
Three ways to create an object
  • Use Dim and New together
  • Dim objectName As New className
  • Using New
  • Public objectName As New ClassName
  • Using CreateObject
  • Set fso CreateObject(Scripting.FileSystemObjec
    t)

10
Object type
  • Collection object
  • Class

11
Defining a New Class
  • JAVA uses block of keyword class statement
  • VB uses Class Module

12
Class module
Declare property Property Get read
only Property Let write-only Both
read-write Private m_Sam As Long Public
Property Get SamAccount() As Long Sam
m_Sam End Property Public Property Let
SamAccount(ByVal newVal As Long) m_Sam
newVal End Property
  • Class module for Stack
  • Stack object

Properties
Methods
?
Read-only
Count
Push
sub
Read-write
function
Item
Pop
13
3 OOPS major features
  • Encapsulation
  • Inheritance
  • Polymophysm

14
Encapsulation
  • Stack Object

Methods
Properties
?
Push
Count
Pop
Item
Hiding implementation
15
Inheritance
Push
new code
Pop
Count
Object of existing class
Item
New Object
16
Polymorphism
  • ListBox.Property Let Visible
  • CompBox.Property Let Visible
  • Picture.Property Let Visible

Ctrl 1
Ctrl 2
Ctrl 3
Early Binding
Substiture any class Property Let Visible Is
search for at run time, In the list of
procedures Supported by item
Property Let Visible
item
Late Binding
17
Conclusion
FUNCTIONS VB JAVA
Complete object-oriented No Yes
Cross-platform compatible No Yes
Distributed Yes Yes
Ease to use Easier Harder
Secure Poorer better
Write a Comment
User Comments (0)
About PowerShow.com