SlideShare a Scribd company logo
1 of 10
Class Program and Library
Tariq Aziz
Program and Library
Imports System.Console
class B
shared Sub Main()
' we will give values in the main
Public Dim id As Integer
Public Dim nm As String
id=10
nm="Bilal"
WriteLine(id)
WriteLine(nm)
End Sub
End class
Shift data into library
Program and Library
Imports System.Console
class B
shared Sub Main()
' we will give values in the
main
id=10
nm="Bilal"
WriteLine(id)
WriteLine(nm)
End Sub
End class
class B
Public Dim id As Integer
Public Dim nm As String
End class
Create object of Library class
Use object to store and print the values
Program and Library
Imports System.Console
class B
shared Sub Main()
' we will give values in
the main
Dim v As B()
v.id=10
v.nm="Tariq"
WriteLine(v.id)
WriteLine(v.nm)
End Sub
End class
class B
Public Dim id As Integer
Public Dim nm As String
End class
Shift display of data to
Library class
Use object to store and print the values
Program and Library
class B
shared Sub Main()
' we will give values in
the main
Dim v As New B()
' initialize the values
v.id=10
v.nm="Tariq"
v.display()
End Sub
End class
Imports System.Console
class B
Public Dim id As Integer
Public Dim nm As String
sub display()
WriteLine(v.id)
WriteLine(v.nm)
End Sub
End class
Shift initialization of data to
Library class
Use object to store and print the values
Program and Initialization in Library
class B
shared Sub Main()
'we will give values in the main
Dim v As New B(10, "Tariq")
v.display()
End Sub
End class
Imports System.Console
class B
Public Dim id As Integer
Public Dim nm As String
sub display()
WriteLine(id)
WriteLine(nm)
End Sub
Sub New(a as Integer, b as String)
id=a
nm=b
End Sub
End class

More Related Content

Similar to Object Oriented Programming - Classes and Library

Similar to Object Oriented Programming - Classes and Library (17)

Java and j2ee_lab-manual
Java and j2ee_lab-manualJava and j2ee_lab-manual
Java and j2ee_lab-manual
 
Hive Functions Cheat Sheet
Hive Functions Cheat SheetHive Functions Cheat Sheet
Hive Functions Cheat Sheet
 
The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.2 book - Part 5 of 84The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.2 book - Part 5 of 84
 
2310 b 03
2310 b 032310 b 03
2310 b 03
 
DevNation'15 - Using Lambda Expressions to Query a Datastore
DevNation'15 - Using Lambda Expressions to Query a DatastoreDevNation'15 - Using Lambda Expressions to Query a Datastore
DevNation'15 - Using Lambda Expressions to Query a Datastore
 
Unit4_2.pdf
Unit4_2.pdfUnit4_2.pdf
Unit4_2.pdf
 
Vb.net iii
Vb.net iiiVb.net iii
Vb.net iii
 
c#(loops,arrays)
c#(loops,arrays)c#(loops,arrays)
c#(loops,arrays)
 
Rethinkdb
RethinkdbRethinkdb
Rethinkdb
 
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012
 
W5_Modeling Design Diagram (2) - OBJECT ORIENTED DESIGN.pptx
W5_Modeling Design Diagram (2) - OBJECT ORIENTED DESIGN.pptxW5_Modeling Design Diagram (2) - OBJECT ORIENTED DESIGN.pptx
W5_Modeling Design Diagram (2) - OBJECT ORIENTED DESIGN.pptx
 
C# and vb
C# and vbC# and vb
C# and vb
 
Inheritance_PART2.pptx
Inheritance_PART2.pptxInheritance_PART2.pptx
Inheritance_PART2.pptx
 
Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdf
 
First approach in linq
First approach in linqFirst approach in linq
First approach in linq
 
create-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfcreate-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdf
 

More from Tariq Aziz (7)

Mazeed feeh
Mazeed feehMazeed feeh
Mazeed feeh
 
Database Normalization slides
Database Normalization slidesDatabase Normalization slides
Database Normalization slides
 
Object Oriented Programming - Lab Activity
Object Oriented Programming - Lab ActivityObject Oriented Programming - Lab Activity
Object Oriented Programming - Lab Activity
 
two dimensional array
two dimensional array two dimensional array
two dimensional array
 
Nahw course 5
Nahw course 5Nahw course 5
Nahw course 5
 
30 hadeeth-for-children
30 hadeeth-for-children30 hadeeth-for-children
30 hadeeth-for-children
 
Sap hana interactive_education_shine_en (1)
Sap hana interactive_education_shine_en (1)Sap hana interactive_education_shine_en (1)
Sap hana interactive_education_shine_en (1)
 

Recently uploaded

MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MysoreMuleSoftMeetup
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
EADTU
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 

Recently uploaded (20)

Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 

Object Oriented Programming - Classes and Library

  • 1. Class Program and Library Tariq Aziz
  • 2. Program and Library Imports System.Console class B shared Sub Main() ' we will give values in the main Public Dim id As Integer Public Dim nm As String id=10 nm="Bilal" WriteLine(id) WriteLine(nm) End Sub End class
  • 3. Shift data into library
  • 4. Program and Library Imports System.Console class B shared Sub Main() ' we will give values in the main id=10 nm="Bilal" WriteLine(id) WriteLine(nm) End Sub End class class B Public Dim id As Integer Public Dim nm As String End class
  • 5. Create object of Library class Use object to store and print the values
  • 6. Program and Library Imports System.Console class B shared Sub Main() ' we will give values in the main Dim v As B() v.id=10 v.nm="Tariq" WriteLine(v.id) WriteLine(v.nm) End Sub End class class B Public Dim id As Integer Public Dim nm As String End class
  • 7. Shift display of data to Library class Use object to store and print the values
  • 8. Program and Library class B shared Sub Main() ' we will give values in the main Dim v As New B() ' initialize the values v.id=10 v.nm="Tariq" v.display() End Sub End class Imports System.Console class B Public Dim id As Integer Public Dim nm As String sub display() WriteLine(v.id) WriteLine(v.nm) End Sub End class
  • 9. Shift initialization of data to Library class Use object to store and print the values
  • 10. Program and Initialization in Library class B shared Sub Main() 'we will give values in the main Dim v As New B(10, "Tariq") v.display() End Sub End class Imports System.Console class B Public Dim id As Integer Public Dim nm As String sub display() WriteLine(id) WriteLine(nm) End Sub Sub New(a as Integer, b as String) id=a nm=b End Sub End class