Learning about Expert Systems through computer programming.

Slides:



Advertisements
Similar presentations
Using VB with MS Applications R. Juhl, Delta College.
Advertisements

CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Tutorial 8: Developing an Excel Application
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
Chapter 6 Multiform Projects Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
Automating Tasks With Macros
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
SUNY Morrisville-Norwich Campus-Week 12 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
Using the Visual Basic Editor Visual Basic for Applications 1.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
VB Code Statements 3 types of VB statement The Remark statement, known as comments, are used for project documentation only Begin with an apostrophe Not.
To type the VB code behind the command button (named cmdPush), Double-Click on the Push Me (caption) command button As a result the Visual Basic Code Window.
Adding Automated Functionality to Office Applications.
Exploring Microsoft Excel 2002 Chapter 8 Chapter 8 Automating Repetitive Tasks: Macros and Visual Basic for Applications By Robert T. Grauer Maryann Barber.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter One An Introduction to Visual Basic 2010.
Slide 1 Chapter 2 Visual Basic Interface. Slide 2 Chapter 2 Windows GUI  A GUI is a graphical user interface.  The interface is what appears on the.
Visual Basic Chapter 1 Mr. Wangler.
05/09/ Introducing Visual Basic Sequence Programming.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
Tutorial 11 Using and Writing Visual Basic for Applications Code
1 Visual Basic for Applications (VBA) for Excel Prof. Yitzchak Rosenthal.
® Microsoft Access 2010 Tutorial 11 Using and Writing Visual Basic for Applications Code.
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 Microsoft Office Excel Copyright © 2008 Pearson Prentice Hall. All rights reserved
Using Visual Basic for Applications (VBA) – Project 8.
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 12: How Long Can This Go On?
Introduction to Visual Basic.NET Chapter 2 Introduction to Controls, Events.
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Outline Software and Programming Program Structure Tools for Designing Software Programming Languages Introduction to Visual Basic (VBA)
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
Chapter 4 Variables and constants. 4.1 Variables -Use of variables is good programming style -easier to modify -easier for a programmer to understand.
Working with the VB IDE. Running a Program u Clicking the”start” tool begins the program u The “break” tool pauses a program in mid-execution u The “end”
Chapter 5: More on the Selection Structure Programming with Microsoft Visual Basic 2005, Third Edition.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 5.1 Test-Driving the Inventory Application.
Chapter 4 Variables and constants. 4.1 Variables -Use of variables is good programming style -easier to modify -easier for a programmer to understand.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
COMPUTER PROGRAMMING I 3.02 Apply Properties Associated with the Controls.
Programming with Microsoft Visual Basic th Edition
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
Chapter 4 Getting Started with VBA. Subroutines Subroutine is the logical section of code that performs a particular task. Subroutine is also called a.
Controlling Program Flow with Decision Structures.
COMPREHENSIVE Access Tutorial 11 Using and Writing Visual Basic for Applications Code.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Chapter 4.  Variables – named memory location that stores a value.  Variables allows the use of meaningful names which makes the code easier to read.
Using Visual Basic.NET Programming Tools in the AIS Course Training Session Brian R. Kovar Kansas State University 7 th AIS Educator Annual Meeting June.
Visual Basic/ Visual Studio Brandon Large. Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software”
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
The Advantage Series ©2005 The McGraw-Hill Companies, Inc. All rights reserved Chapter 12 Introducing Visual Basic for Applications Microsoft Office Excel.
Developing Visual Basic Applications to Interact with an Access Database Training Session Brian R. Kovar Kansas State University 8 th AIS Educator Annual.
A variable is a name for a value stored in memory.
Chapter 2: The Visual Studio .NET Development Environment
Chapter 1: An Introduction to Visual Basic 2015
Chapter 8: Writing Graphical User Interfaces
Microsoft Access Illustrated
Chapter 2 Visual Basic Interface
Objectives Learn about Function procedures (functions), Sub procedures (subroutines), and modules Review and modify an existing subroutine in an event.
Exploring Microsoft Office Access 2007
VISUAL BASIC.
Microsoft Visual Basic 2005 BASICS
Building an Application in the Visual Basic .NET Environment
VB.NET PROGRAMMING FINAL EXAM TEST REVIEW.
Creating an Expert System Using Visual Basic.NET Training Session
Introduction to Programming
Tutorial 11 Using and Writing Visual Basic for Applications Code
Presentation transcript:

Learning about Expert Systems through computer programming

The exercises we are doing are designed to give students: – Exposure – A deeper – An Material has gone through the academic review process – Presented at the 2004 AIS Educator Conference: received a Best Paper award – Published in the Review of Business Information Systems in 2005 (volume 9, number 1) – Presented as hands-on training sessions at the 2005 and 2006 AIS Educator Conference. – Presented as part of an Effective Learning Strategies poster presentation at the 2007 American Accounting Association annual meeting. – This material has led to other VB instructional material published by the AAA, as well as presentations at other AIS Educator Conferences (Interacting with a database using VB.NET)

Programming helps build business competencies Programming helps develop and improve problem – Increased ability to handle more complex issues and problems (Beard and Smith 2002) – Will develop critical thinking skills that are (Fordham 2005) AICPA core competency: ability to (2004) The lack of programming skills may handicap accountants in working effectively as IS auditors (Calderon, Cheh, Chatham 2002) The Information Systems Audit and Control Association (ISACA) has developed curriculum models stressing the need and importance of computer programming skills. Even if you never program in your career, having these types of skills can change how you look at things.

Types of programming that you might experience Creating a Creating Creating Visual Basic programs – VB is one of the easiest programming languages to learn and use Using VBA –V–V – Programming language used in Microsoft Office (especially Excel) that integrates the application software functionality with the Visual Basic language. – Macro programming in Excel

When a computer program is created, what are the two primary components? The (GUI) – What the Icons, windows and other controls that can be clicked or double clicked in order for the computer to do something. The actual – The – The computer doesn’t know what to do unless there is some sort of program or code that tells it what must be done and how it is to be done. VB is an VB only

Expert: one with special skill or knowledge representing mastery of a particular subject – Human experts reason through a problem/process, with the end result being a recommended solution or diagnosis. Expert systems are a form of artificial intelligence that is designed to capture expertise and make that available for others to use –D–D –P–P Expert systems follow decision making rules, typically in the form of

Expert System Decision Tree Good Income? Education Employment? References? Education Bad High Low High Low Grant the Loan Investigate Further Refuse the Loan Low Medium High Employed Unemployed

Label – Used to Button – Used to Radio button/option button – Allows the user Check box: Allows the user to select multiple options at the same time List box: Allows the user to select an option from a drop- down list Text Box: allows the user to provide data input for the program while the program is actually running (input which will then be used in various calculations/operations.

Windows Form Designer generated code – A by VB – Never delete or actively modify code in this section Don’t even open it up. Your coding needs to go underneath this area. Event procedures are when a certain event occurs – Our only event will be the Click event

The Blue Words are reserved words in VB that have exact meaning in the VB syntax – Private Sub event procedures/sub routines – End Sub of an event procedure – Dim is a variable declaration statement Used – M is a way to refer to the currently active form Programmers typically indent their code to make it easier to read (and find errors). something indicates action Abbreviations used in naming

Variables M Why called variables? – Data stored in these memory locations – O variables can be used to store anything and take up the greatest amount of memory space. – String variables are used to store (letters and numbers not used in calculations) – Numeric variables are used in Integer, decimal, single, double, short, long How is a variable going to be used and what type of data will it store? See tutorial page 4

IntelliSense A VB feature that is “aware” of what you are doing and it will provide suggestions and assistance regarding what you might want to include in the statement that you are coding (and it also checks your spelling Pressing the space bar adds the item currently highlighted in the IntelliSense listing to your code

M. This window will stay on the screen until the user has acknowledged it. The syntax of a message box statement is MsgBox (“The message to display”, Buttons, “A title for the message box”) – Message to display to the user (inside quote marks) – What types of icons and buttons should be displayed inside the message box – Title text (which appears in the message box title bar MsgBox("Grant the Loan", MsgBoxStyle.Information, "Recommendation")

C is a form of internal program documentation that is It is used to clarify the purpose of a line or section of code. An signals the start of a comment.

Radio Buttons (also known as) Allow the user to select from a group of options – Programmers typically use these in conjunction with Checkbox controls can also be used with selection statements. Checkboxes allow the user to select multiple options at the same time

Selection Statements Allows a computer program to, depending on certain conditions in the data or depending on user input – I statements are one of the most common forms of selection statements. In 366, your IF statements selected one of two courses of action. Real computer programs have multiple courses of action inside IF statements (ElseIF) There can even be nested Ifs ()

Expert System Decision Tree Good Income? Education Employment? References? Education Bad High Low High Low Grant the Loan Investigate Further Refuse the Loan Low Medium High Employed Unemployed

Variables Memory locations used to store data. The data stored in these memory locations can change (vary) as the program runs. – Object variables can be used to store anything and take up the greatest amount of memory space. – String variables are used to store a sequence of text (letters and numbers not used in calculations) – Numeric variables are used in calculations Integer, decimal, single, double, short, long The variable ‘s data type is determined based on how is a variable going to be used and what type of data will be stored in that variable. The VB keyword used to declare a variable is:

Variable Scope When creating variables, programmers must think about the scope of the variable. – Variable scope: A variable’s scope is determined by and the variable is declared – A variable declared – A variable declared outside an event procedure (. Any event procedure can access (and modify) variables in the general declarations area

Global Variables Variables that can be shared across all forms have global scope and those types of variables are referred to as Global variables are Code modules are shared by all forms – Global variables are declared using a Public statement (rather than a Dim statement)

Expert System Decision Tree Good Income? Education Employment? References? Education Bad High Low High Low Grant the Loan Investigate Further Refuse the Loan Low Medium High Employed Unemployed

To create a code module Go to the Project menu, select Add Module, click once on module, then Add

To create a code module Go to the Project menu, select Add Windows Form, click once on Windows Form, then Add

The Show method is used to The Hide method is used to E is the code used to end/stop/exit a program.

Programmers use loops to repeat actions (the coding below simulates a loop)

Properties AutoSize: – Does the control resize itself to fit its text? True or False Size property 128, width, 48 height Text property: text displayed inside the control. Location property: – where on the form the control is located/found

Properties (Name) property: specifies the name of the control/object. This name can also be used in the code and it also appears in IntelliSense – objFormEducationExitButton – frmFinal.vbHighRadioButton You can also specify font size, font styles and background colors Visible (default is true), but can be set to false. Program code can be used to make a control visible or invisible as the program is running

Properties Checked property: – changing from False to True causes an object (such as an option button) to be selected by default – This can and should be set to ensure that the user selects an option (because if the user does not select an option, then the program may operate incorrectly or crash) – See tutorial page 17 for explanation