VB FOR AMIRA ONLY

profileKATONO
bookdemo.zip

BookDemo/bin/Debug/BookDemo.exe

BookDemo/bin/Debug/BookDemo.pdb

BookDemo/bin/Debug/BookDemo.vshost.exe

BookDemo/bin/Debug/BookDemo.vshost.exe.manifest

BookDemo/bin/Debug/BookDemo.xml

BookDemo

BookDemo/bin/Debug/WindowsApplication1.exe

BookDemo/bin/Debug/WindowsApplication1.pdb

BookDemo/bin/Debug/WindowsApplication1.vshost.exe

BookDemo/bin/Debug/WindowsApplication1.xml

WindowsApplication1

BookDemo/Book.vb

Public Class Book 'this is the superclass 'declaring superclass variables Private ISBN As String Private title As String Private author As String Private price As Double Public Overridable Property Book_Price() As Double 'Book price Property 'in this property, note the additinal Overridable declaration. 'this will enable us to override this property is the sub-classe Get Return price End Get Set(ByVal intval As Double) price = intval End Set End Property Public Property ISBN_Number() As String 'ISBN Name Property 'note that this property declaration has no Overridable keyword 'therefore we cannot override it in the sub classes Get Return ISBN End Get Set(ByVal value As String) ISBN = value End Set End Property Public Property Book_Author() As String 'the Book Author Property Get Return author End Get Set(ByVal value As String) author = value End Set End Property Public Property BookTitle() As String 'Book title Property Get Return title End Get Set(ByVal value As String) title = value End Set End Property Public Overridable Overloads Function Equals(ByVal ISBN1 As String) As Boolean ' Even if two ISBNs are aqual, the compiler will render them as equal 'the compiler does not know how to compare the two instances 'Here, we oveeload the Equals() method in this class so that 'if the ISBN are the same, they are considered equal If ISBN1 = Me.ISBN Then Return True MsgBox("Duplicate ISBN Entry!.") Exit Function ' If the ISBNs are not equal, then the result is not true Return False End Function End Class

BookDemo/BookDemo.vbproj

Debug AnyCPU 9.0.21022 2.0 {CD71581E-F313-45F4-9D03-675BB9D22713} WinExe WindowsApplication1.My.MyApplication WindowsApplication1 BookDemo 512 WindowsForms v3.5 On Binary Off On true full true true bin\Debug\ BookDemo.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 pdbonly false true true bin\Release\ BookDemo.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 3.5 3.5 3.5 Form Form1.vb Form True Application.myapp True True Resources.resx True Settings.settings True Form1.vb Designer VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer MyApplicationCodeGenerator Application.Designer.vb SettingsSingleFileGenerator My Settings.Designer.vb

BookDemo/BookDemo.vbproj.user

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

BookDemo/CoffeeTableBook.vb

Imports System Public Class CoffeeTableBook 'this is the CoffeeTableBook child class 'this child class inherits properties from the Superclass Book 'it has no additional private variables Inherits Book Dim price As Double Public Overrides Property Book_Price() As Double 'this declaration overrides the main class declaration of 'the price property in the main Book class that we inherited 'in this child class CoffeeTableBook. We change the property from integer 'to values between 35 and 100 inclusive Get Try ' exception to catch if values outside the coffeeTableBook price is entered Return price >= 35 <= 100 Catch ex As Exception When price = 100 MsgBox("Price for Coffee Table books exceeds $100! Not accepted") Exit Property Catch ex As Exception When price < 35 MsgBox("Price for text Coffee Table Book is below $35! Not accepted!.") Exit Property End Try End Get Set(ByVal intval As Double) price = intval End Set End Property End Class

BookDemo/Form1.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class Form1 Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally MyBase.Dispose(disposing) End Try End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Me.BookTabs = New System.Windows.Forms.TabControl Me.Tab1 = New System.Windows.Forms.TabPage Me.btnAdd = New System.Windows.Forms.Button Me.txtGrade = New System.Windows.Forms.TextBox Me.Label5 = New System.Windows.Forms.Label Me.Label4 = New System.Windows.Forms.Label Me.Label3 = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.LABEL1 = New System.Windows.Forms.Label Me.txtPrice = New System.Windows.Forms.TextBox Me.txtAuthor = New System.Windows.Forms.TextBox Me.txtTitle = New System.Windows.Forms.TextBox Me.txtISBN = New System.Windows.Forms.TextBox Me.Tab2 = New System.Windows.Forms.TabPage Me.ListBox2 = New System.Windows.Forms.ListBox Me.Button1 = New System.Windows.Forms.Button Me.Label6 = New System.Windows.Forms.Label Me.Label7 = New System.Windows.Forms.Label Me.Label8 = New System.Windows.Forms.Label Me.Label9 = New System.Windows.Forms.Label Me.txtISBN1 = New System.Windows.Forms.TextBox Me.txtTitle1 = New System.Windows.Forms.TextBox Me.txtAuthor1 = New System.Windows.Forms.TextBox Me.txtPrice1 = New System.Windows.Forms.TextBox Me.ListBox1 = New System.Windows.Forms.ListBox Me.BookTabs.SuspendLayout() Me.Tab1.SuspendLayout() Me.Tab2.SuspendLayout() Me.SuspendLayout() ' 'BookTabs ' Me.BookTabs.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.BookTabs.Appearance = System.Windows.Forms.TabAppearance.Buttons Me.BookTabs.Controls.Add(Me.Tab1) Me.BookTabs.Controls.Add(Me.Tab2) Me.BookTabs.Location = New System.Drawing.Point(-5, 1) Me.BookTabs.Name = "BookTabs" Me.BookTabs.SelectedIndex = 0 Me.BookTabs.Size = New System.Drawing.Size(567, 182) Me.BookTabs.TabIndex = 0 ' 'Tab1 ' Me.Tab1.Controls.Add(Me.btnAdd) Me.Tab1.Controls.Add(Me.txtGrade) Me.Tab1.Controls.Add(Me.Label5) Me.Tab1.Controls.Add(Me.Label4) Me.Tab1.Controls.Add(Me.Label3) Me.Tab1.Controls.Add(Me.Label2) Me.Tab1.Controls.Add(Me.LABEL1) Me.Tab1.Controls.Add(Me.txtPrice) Me.Tab1.Controls.Add(Me.txtAuthor) Me.Tab1.Controls.Add(Me.txtTitle) Me.Tab1.Controls.Add(Me.txtISBN) Me.Tab1.Controls.Add(Me.ListBox2) Me.Tab1.Location = New System.Drawing.Point(4, 25) Me.Tab1.Name = "Tab1" Me.Tab1.Padding = New System.Windows.Forms.Padding(3) Me.Tab1.Size = New System.Drawing.Size(559, 153) Me.Tab1.TabIndex = 0 Me.Tab1.Text = "TextBook" Me.Tab1.UseVisualStyleBackColor = True ' 'btnAdd ' Me.btnAdd.Location = New System.Drawing.Point(180, 99) Me.btnAdd.Name = "btnAdd" Me.btnAdd.Size = New System.Drawing.Size(138, 38) Me.btnAdd.TabIndex = 11 Me.btnAdd.Text = "Add" Me.btnAdd.UseVisualStyleBackColor = True ' 'txtGrade ' Me.txtGrade.Location = New System.Drawing.Point(416, 71) Me.txtGrade.Name = "txtGrade" Me.txtGrade.Size = New System.Drawing.Size(69, 20) Me.txtGrade.TabIndex = 10 ' 'Label5 ' Me.Label5.AutoSize = True Me.Label5.Location = New System.Drawing.Point(407, 34) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(65, 13) Me.Label5.TabIndex = 9 Me.Label5.Text = "Grade Level" ' 'Label4 ' Me.Label4.AutoSize = True Me.Label4.Location = New System.Drawing.Point(316, 33) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(31, 13) Me.Label4.TabIndex = 8 Me.Label4.Text = "Price" ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.Location = New System.Drawing.Point(215, 36) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(38, 13) Me.Label3.TabIndex = 7 Me.Label3.Text = "Author" ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(122, 40) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(27, 13) Me.Label2.TabIndex = 6 Me.Label2.Text = "Title" ' 'LABEL1 ' Me.LABEL1.AutoSize = True Me.LABEL1.Location = New System.Drawing.Point(32, 43) Me.LABEL1.Name = "LABEL1" Me.LABEL1.Size = New System.Drawing.Size(32, 13) Me.LABEL1.TabIndex = 5 Me.LABEL1.Text = "ISBN" ' 'txtPrice ' Me.txtPrice.Location = New System.Drawing.Point(314, 73) Me.txtPrice.Name = "txtPrice" Me.txtPrice.Size = New System.Drawing.Size(75, 20) Me.txtPrice.TabIndex = 4 ' 'txtAuthor ' Me.txtAuthor.Location = New System.Drawing.Point(213, 73) Me.txtAuthor.Name = "txtAuthor" Me.txtAuthor.Size = New System.Drawing.Size(78, 20) Me.txtAuthor.TabIndex = 3 ' 'txtTitle ' Me.txtTitle.Location = New System.Drawing.Point(117, 73) Me.txtTitle.Name = "txtTitle" Me.txtTitle.Size = New System.Drawing.Size(79, 20) Me.txtTitle.TabIndex = 2 ' 'txtISBN ' Me.txtISBN.Location = New System.Drawing.Point(29, 73) Me.txtISBN.Name = "txtISBN" Me.txtISBN.Size = New System.Drawing.Size(66, 20) Me.txtISBN.TabIndex = 1 ' 'Tab2 ' Me.Tab2.Controls.Add(Me.txtPrice1) Me.Tab2.Controls.Add(Me.txtAuthor1) Me.Tab2.Controls.Add(Me.txtTitle1) Me.Tab2.Controls.Add(Me.txtISBN1) Me.Tab2.Controls.Add(Me.Label9) Me.Tab2.Controls.Add(Me.Label8) Me.Tab2.Controls.Add(Me.Label7) Me.Tab2.Controls.Add(Me.Label6) Me.Tab2.Controls.Add(Me.Button1) Me.Tab2.Location = New System.Drawing.Point(4, 25) Me.Tab2.Name = "Tab2" Me.Tab2.Padding = New System.Windows.Forms.Padding(3) Me.Tab2.Size = New System.Drawing.Size(559, 153) Me.Tab2.TabIndex = 1 Me.Tab2.Text = "CoffeeTableBook" Me.Tab2.UseVisualStyleBackColor = True ' 'ListBox2 ' Me.ListBox2.FormattingEnabled = True Me.ListBox2.Location = New System.Drawing.Point(433, 73) Me.ListBox2.Name = "ListBox2" Me.ListBox2.Size = New System.Drawing.Size(24, 17) Me.ListBox2.TabIndex = 13 ' 'Button1 ' Me.Button1.Location = New System.Drawing.Point(167, 91) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(151, 41) Me.Button1.TabIndex = 0 Me.Button1.Text = "Add" Me.Button1.UseVisualStyleBackColor = True ' 'Label6 ' Me.Label6.AutoSize = True Me.Label6.Location = New System.Drawing.Point(82, 31) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(35, 13) Me.Label6.TabIndex = 1 Me.Label6.Text = "ISBN " ' 'Label7 ' Me.Label7.AutoSize = True Me.Label7.Location = New System.Drawing.Point(194, 31) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(27, 13) Me.Label7.TabIndex = 2 Me.Label7.Text = "Title" ' 'Label8 ' Me.Label8.AutoSize = True Me.Label8.Location = New System.Drawing.Point(271, 31) Me.Label8.Name = "Label8" Me.Label8.Size = New System.Drawing.Size(38, 13) Me.Label8.TabIndex = 3 Me.Label8.Text = "Author" ' 'Label9 ' Me.Label9.AutoSize = True Me.Label9.Location = New System.Drawing.Point(372, 31) Me.Label9.Name = "Label9" Me.Label9.Size = New System.Drawing.Size(31, 13) Me.Label9.TabIndex = 4 Me.Label9.Text = "Price" ' 'txtISBN1 ' Me.txtISBN1.Location = New System.Drawing.Point(65, 65) Me.txtISBN1.Name = "txtISBN1" Me.txtISBN1.Size = New System.Drawing.Size(60, 20) Me.txtISBN1.TabIndex = 5 ' 'txtTitle1 ' Me.txtTitle1.Location = New System.Drawing.Point(179, 65) Me.txtTitle1.Name = "txtTitle1" Me.txtTitle1.Size = New System.Drawing.Size(68, 20) Me.txtTitle1.TabIndex = 6 ' 'txtAuthor1 ' Me.txtAuthor1.Location = New System.Drawing.Point(284, 65) Me.txtAuthor1.Name = "txtAuthor1" Me.txtAuthor1.Size = New System.Drawing.Size(67, 20) Me.txtAuthor1.TabIndex = 7 ' 'txtPrice1 ' Me.txtPrice1.Location = New System.Drawing.Point(375, 65) Me.txtPrice1.Name = "txtPrice1" Me.txtPrice1.Size = New System.Drawing.Size(79, 20) Me.txtPrice1.TabIndex = 8 ' 'ListBox1 ' Me.ListBox1.FormattingEnabled = True Me.ListBox1.Location = New System.Drawing.Point(54, 184) Me.ListBox1.Name = "ListBox1" Me.ListBox1.Size = New System.Drawing.Size(470, 121) Me.ListBox1.TabIndex = 1 ' 'Form1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(574, 317) Me.Controls.Add(Me.ListBox1) Me.Controls.Add(Me.BookTabs) Me.Name = "Form1" Me.Text = "Form1" Me.BookTabs.ResumeLayout(False) Me.Tab1.ResumeLayout(False) Me.Tab1.PerformLayout() Me.Tab2.ResumeLayout(False) Me.Tab2.PerformLayout() Me.ResumeLayout(False) End Sub Friend WithEvents BookTabs As System.Windows.Forms.TabControl Friend WithEvents Tab1 As System.Windows.Forms.TabPage Friend WithEvents Tab2 As System.Windows.Forms.TabPage Friend WithEvents txtPrice As System.Windows.Forms.TextBox Friend WithEvents txtAuthor As System.Windows.Forms.TextBox Friend WithEvents txtTitle As System.Windows.Forms.TextBox Friend WithEvents txtISBN As System.Windows.Forms.TextBox Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents LABEL1 As System.Windows.Forms.Label Friend WithEvents btnAdd As System.Windows.Forms.Button Friend WithEvents txtGrade As System.Windows.Forms.TextBox Friend WithEvents ListBox2 As System.Windows.Forms.ListBox Friend WithEvents txtPrice1 As System.Windows.Forms.TextBox Friend WithEvents txtAuthor1 As System.Windows.Forms.TextBox Friend WithEvents txtTitle1 As System.Windows.Forms.TextBox Friend WithEvents txtISBN1 As System.Windows.Forms.TextBox Friend WithEvents Label9 As System.Windows.Forms.Label Friend WithEvents Label8 As System.Windows.Forms.Label Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents ListBox1 As System.Windows.Forms.ListBox End Class

BookDemo/Form1.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

BookDemo/Form1.vb

Imports System Public Class Form1 Private Sub TabPage1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub Tab1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Tab1.Click End Sub Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click Dim TxtBook As TextBook = New TextBook() Dim tf As Boolean Dim x As Integer Dim number As Integer If ListBox1.Items.Count = 0 And txtISBN.Text <> "" Then ListBox1.Items.Add(txtISBN.Text) ListBox2.Items.Add(txtISBN.Text) 'check to make sure no duplicate entries get into list box Else tf = False For x = 0 To ListBox2.Items.Count - 1 If ListBox2.Items(x) <> txtISBN.Text Then tf = False Else tf = True MessageBox.Show("Duplicate entry recognised!") Exit For End If Next x If Val(txtPrice.Text) > 80 Then MsgBox("Price for TextBook is greater than $80! Not accepted!.") Exit Sub ElseIf Val(txtPrice.Text) < 20 Then MsgBox("Price for TextBook is less than $80! Not accepted!.") Exit Sub End If If tf = False And txtISBN.Text <> "" And txtPrice.Text <> "" Then ListBox2.Items.Add(txtISBN.Text) ListBox1.Items.Add(txtISBN.Text & vbTab & txtTitle.Text & vbTab & txtAuthor.Text & vbTab & txtPrice.Text & vbTab & vbTab & txtGrade.Text) End If End If Try number = CDbl(Me.txtPrice.Text) Catch MessageBox.Show("Price must be integer!.") End Try Exit Sub If number > 80 Then Try number = CDbl(Me.txtPrice.Text) Catch MsgBox("Price for TextBook is greater than $80! Not accepted!.") End Try Exit Sub ElseIf number < 20 Then Try number = CDbl(Me.txtPrice.Text) Catch MsgBox("Price for Text Book is below $20! Not accepted!.") End Try Exit Sub Else 'Call CatchDuplicate() End If End Sub Public Sub CatchDuplicate() Dim tf As Boolean Dim x As Integer If ListBox1.Items.Count = 0 And txtISBN.Text <> "" Then ListBox1.Items.Add(txtISBN.Text) ListBox2.Items.Add(txtISBN.Text) 'check to make sure no duplicate entries get into list box Else tf = False For x = 0 To ListBox2.Items.Count - 1 If ListBox2.Items(x) <> txtISBN.Text Then tf = False Else tf = True MessageBox.Show("Duplicate entry recognised!") Exit For End If Next x If tf = False And txtISBN.Text <> "" Then ListBox2.Items.Add(txtISBN.Text) ListBox1.Items.Add(txtISBN.Text & txtTitle.Text & txtAuthor.Text & txtPrice.Text & txtGrade.Text) End If End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) CatchDuplicate() End Sub Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim TxtBook As TextBook = New TextBook() Dim tf As Boolean Dim x As Integer Dim number As Integer If ListBox1.Items.Count = 0 And txtISBN.Text <> "" Then ListBox1.Items.Add(txtISBN.Text) ListBox2.Items.Add(txtISBN.Text) 'check to make sure no duplicate entries get into list box Else tf = False For x = 0 To ListBox2.Items.Count - 1 If ListBox2.Items(x) <> txtISBN1.Text Then tf = False Else tf = True MessageBox.Show("Duplicate entry recognised!") Exit For End If Next x If Val(txtPrice1.Text) > 100 Then MsgBox("Price for TextBook is greater than $100! Not accepted!.") Exit Sub ElseIf Val(txtPrice1.Text) < 35 Then MsgBox("Price for TextBook is less than $35! Not accepted!.") Exit Sub End If If tf = False And txtISBN.Text <> "" And txtPrice.Text <> "" Then ListBox2.Items.Add(txtISBN.Text) ListBox1.Items.Add(txtISBN1.Text & vbTab & txtTitle1.Text & vbTab & txtAuthor1.Text & vbTab & txtPrice1.Text) End If End If Try number = CDbl(Me.txtPrice1.Text) Catch MessageBox.Show("Price must be integer!.") End Try Exit Sub If number > 100 Then Try number = CDbl(Me.txtPrice.Text) Catch MsgBox("Price for TextBook is greater than $80! Not accepted!.") End Try Exit Sub ElseIf number < 35 Then Try number = CDbl(Me.txtPrice.Text) Catch MsgBox("Price for Text Book is below $20! Not accepted!.") End Try Exit Sub Else 'Call CatchDuplicate() End If End Sub End Class

BookDemo/My Project/Application.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:2.0.50727.5485 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' </auto-generated> '------------------------------------------------------------------------------ Option Strict On Option Explicit On Namespace My 'NOTE: This file is auto-generated; do not modify it directly. To make changes, ' or if you encounter build errors in this file, go to the Project Designer ' (go to Project Properties or double-click the My Project node in ' Solution Explorer), and make changes on the Application tab. ' Partial Friend Class MyApplication <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Public Sub New() MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) Me.IsSingleInstance = false Me.EnableVisualStyles = true Me.SaveMySettingsOnExit = true Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses End Sub <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.WindowsApplication1.Form1 End Sub End Class End Namespace

BookDemo/My Project/Application.myapp

true Form1 false 0 true 0 0 true

BookDemo/My Project/AssemblyInfo.vb

Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("WindowsApplication1")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("")> <Assembly: AssemblyProduct("WindowsApplication1")> <Assembly: AssemblyCopyright("Copyright © 2014")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("b79420b9-6450-4f90-9f55-ee1ee77ff8f5")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' Build Number ' Revision ' ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: ' <Assembly: AssemblyVersion("1.0.*")> <Assembly: AssemblyVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>

BookDemo/My Project/Resources.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:2.0.50727.5485 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' </auto-generated> '------------------------------------------------------------------------------ Option Strict On Option Explicit On Namespace My.Resources 'This class was auto-generated by the StronglyTypedResourceBuilder 'class via a tool like ResGen or Visual Studio. 'To add or remove a member, edit your .ResX file then rerun ResGen 'with the /str option, or rebuild your VS project. '<summary> ' A strongly-typed resource class, for looking up localized strings, etc. '</summary> <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources Private resourceMan As Global.System.Resources.ResourceManager Private resourceCulture As Global.System.Globalization.CultureInfo '<summary> ' Returns the cached ResourceManager instance used by this class. '</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("WindowsApplication1.Resources", GetType(Resources).Assembly) resourceMan = temp End If Return resourceMan End Get End Property '<summary> ' Overrides the current thread's CurrentUICulture property for all ' resource lookups using this strongly typed resource class. '</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get Set(ByVal value As Global.System.Globalization.CultureInfo) resourceCulture = value End Set End Property End Module End Namespace

BookDemo/My Project/Resources.resx

text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

BookDemo/My Project/Settings.Designer.vb

'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:2.0.50727.5485 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' </auto-generated> '------------------------------------------------------------------------------ Option Strict On Option Explicit On Namespace My <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0"), _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) #Region "My.Settings Auto-Save Functionality" #If _MyType = "WindowsForms" Then Private Shared addedHandler As Boolean Private Shared addedHandlerLockObject As New Object <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) If My.Application.SaveMySettingsOnExit Then My.Settings.Save() End If End Sub #End If #End Region Public Shared ReadOnly Property [Default]() As MySettings Get #If _MyType = "WindowsForms" Then If Not addedHandler Then SyncLock addedHandlerLockObject If Not addedHandler Then AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings addedHandler = True End If End SyncLock End If #End If Return defaultInstance End Get End Property End Class End Namespace Namespace My <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.WindowsApplication1.My.MySettings Get Return Global.WindowsApplication1.My.MySettings.Default End Get End Property End Module End Namespace

BookDemo/My Project/Settings.settings

BookDemo/obj/Debug/BookDemo.exe

BookDemo/obj/Debug/BookDemo.pdb

BookDemo/obj/Debug/BookDemo.vbproj.FileListAbsolute.txt

C:\Users\Christen\Desktop\PENDING JOBS\BookDemo\BookDemo\bin\Debug\BookDemo.exe C:\Users\Christen\Desktop\PENDING JOBS\BookDemo\BookDemo\bin\Debug\BookDemo.pdb C:\Users\Christen\Desktop\PENDING JOBS\BookDemo\BookDemo\bin\Debug\BookDemo.xml C:\Users\Christen\Desktop\PENDING JOBS\BookDemo\BookDemo\obj\Debug\ResolveAssemblyReference.cache C:\Users\Christen\Desktop\PENDING JOBS\BookDemo\BookDemo\obj\Debug\WindowsApplication1.Form1.resources C:\Users\Christen\Desktop\PENDING JOBS\BookDemo\BookDemo\obj\Debug\WindowsApplication1.Resources.resources C:\Users\Christen\Desktop\PENDING JOBS\BookDemo\BookDemo\obj\Debug\BookDemo.vbproj.GenerateResource.Cache C:\Users\Christen\Desktop\PENDING JOBS\BookDemo\BookDemo\obj\Debug\BookDemo.exe C:\Users\Christen\Desktop\PENDING JOBS\BookDemo\BookDemo\obj\Debug\BookDemo.xml C:\Users\Christen\Desktop\PENDING JOBS\BookDemo\BookDemo\obj\Debug\BookDemo.pdb

BookDemo/obj/Debug/BookDemo.vbproj.GenerateResource.Cache

BookDemo/obj/Debug/BookDemo.xml

BookDemo

BookDemo/obj/Debug/TempPE/My Project.Resources.Designer.vb.dll

BookDemo/obj/Debug/WindowsApplication1.exe

BookDemo/obj/Debug/WindowsApplication1.Form1.resources

BookDemo/obj/Debug/WindowsApplication1.pdb

BookDemo/obj/Debug/WindowsApplication1.Resources.resources

BookDemo/obj/Debug/WindowsApplication1.vbproj.FileListAbsolute.txt

C:\Users\Christen\AppData\Local\Temporary Projects\WindowsApplication1\bin\Debug\WindowsApplication1.exe C:\Users\Christen\AppData\Local\Temporary Projects\WindowsApplication1\bin\Debug\WindowsApplication1.pdb C:\Users\Christen\AppData\Local\Temporary Projects\WindowsApplication1\bin\Debug\WindowsApplication1.xml C:\Users\Christen\AppData\Local\Temporary Projects\WindowsApplication1\obj\Debug\ResolveAssemblyReference.cache C:\Users\Christen\AppData\Local\Temporary Projects\WindowsApplication1\obj\Debug\WindowsApplication1.Form1.resources C:\Users\Christen\AppData\Local\Temporary Projects\WindowsApplication1\obj\Debug\WindowsApplication1.Resources.resources C:\Users\Christen\AppData\Local\Temporary Projects\WindowsApplication1\obj\Debug\WindowsApplication1.vbproj.GenerateResource.Cache C:\Users\Christen\AppData\Local\Temporary Projects\WindowsApplication1\obj\Debug\WindowsApplication1.exe C:\Users\Christen\AppData\Local\Temporary Projects\WindowsApplication1\obj\Debug\WindowsApplication1.xml C:\Users\Christen\AppData\Local\Temporary Projects\WindowsApplication1\obj\Debug\WindowsApplication1.pdb

BookDemo/obj/Debug/WindowsApplication1.vbproj.GenerateResource.Cache

BookDemo/obj/Debug/WindowsApplication1.xml

WindowsApplication1

BookDemo/TextBook.vb

Imports System Public Class TextBook ' this is the child class TextBook that inherits from superclass Book Inherits Book 'adding private variable to this subclass Private GradeLevel As String Private price As Double Public Property Grade() As String 'the Book Author Property Get Return GradeLevel End Get Set(ByVal value As String) GradeLevel = value End Set End Property Public Overrides Property Book_Price() As Double 'this declaration overrides the main class declaration of 'the price property in the main Book class that we inherited 'in this child class TextBook. We change the property from integer 'to values between 35 and 100 inclusive Get Try ' exception to catch if values outside the TextBook price is entered Return price Catch ex As Exception When price > 80 MsgBox("Price for Text books exceeds $80! Not accepted") Exit Property Catch ex As Exception When price < 20 MsgBox("Price for Text Book is below $20! Not accepted!.") Exit Property End Try End Get Set(ByVal intval As Double) price = intval End Set End Property End Class

BookDemo.sln

Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "BookDemo", "BookDemo\BookDemo.vbproj", "{CD71581E-F313-45F4-9D03-675BB9D22713}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {CD71581E-F313-45F4-9D03-675BB9D22713}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CD71581E-F313-45F4-9D03-675BB9D22713}.Debug|Any CPU.Build.0 = Debug|Any CPU {CD71581E-F313-45F4-9D03-675BB9D22713}.Release|Any CPU.ActiveCfg = Release|Any CPU {CD71581E-F313-45F4-9D03-675BB9D22713}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal