Course 7. First rule-based app Java and Jess
|
|
- Randell Harvey
- 6 years ago
- Views:
Transcription
1 Course 7 First rule-based app Java and Jess
2 Tax form advisor asks the user a series of questions based on the answers, tells the user which form is needed populate the application with data a command-line interface concentrate on developing the rules themselves so the entire program will be written in Jess
3 Collecting the knowledge information will include: Requirements Looking at the problem the system needs to solve is the first step - may continue Principles You need to learn the organizing principles of the field. Resources Frontiers the though bits, ambiguities, and limits
4 Collecting the knowledge (cont.) iterative process: first talk to the customers: their needs + resources Requirements engineering Technical sources of information Study general resources learn fundamentals of the domain First knowledge extraction Q1 A1 Q2 A2...
5 Collecting the knowledge (cont.) find cooperative experts interview > more information - organize Rules
6 Collecting the knowledge (cont.) (defrule use-ez-form ; If filing status is "single", and... (filing-status single) ) ; user made less than $50000 (income?i&:(<?i 50000)) => ; recommend the user file Form 1040EZ (recommend Form1040EZ)
7 Collecting the knowledge (cont.) Verify so far: Customers Users Domain experts End of phase: organize data deftemplates Organize rules defmodules write some infrastructure: functions for input and output
8 Designing the application possible candidates for deftemplate types: form A specific tax form user The operator of the system deduction A way of reducing your taxable income credit A way of reducing your tax burden dependent A person the user cares for General organization of the application suggests: question A question the system might ask the user answer An answer given by the user recommendation A note that the system will recommend a specific form decide what form they will take ordered or unordered facts what slots should they have (unordered)
9 Designing the application (cont.) Forms (deftemplate form (slot name)(slot description)) Questions and answers Value, yes/no (deftemplate question (slot text) (slot type) (slot ident)) (deftemplate answer (slot ident) (slot text)) recommendation (deftemplate recommendation (slot form) (slot explanation)) Complete?
10 Designing the application (cont.) sketch out a structure for how the rules will be organized O The Tax Forms Advisor: Modules: 1. Initialize the application Startup 2. Conduct an interview - determine tax situation Interview 3. Figure out what tax forms to recommend Recommend 4. Present list of forms to the user, removing Report any duplicate recommendations
11 Designing the application (cont.) Module groups facts + rules!!! Different modules cannot share the same deftemplate => move to MAIN Templates question and answer used by interview and recommend modules, all deftemplates defined in MAIN
12 Designing the application (cont.) Print question + read answer (deffunction ask-user (?question) ) "Ask a question, and return the answer" (printout t?question " ") (return (read))
13 Designing the application (cont.) Check answer (deffunction is-of-type (?answer?type) "Check that the answer has the right form" (if (eq?type yes-no) then (return (or (eq?answer yes) (eq?answer no))) else (if (eq?type number) then (return (numberp?answer))) else (return (> (str-length?answer) 0))))
14 Writing the application (defmodule startup) (defmodule interview) (defmodule recommend) (defmodule report) (deffunction run-system () (reset) (focus startup interview recommend report) (run) )
15 Java & Jess
16 Using Java from Jess functions - create and manipulate Java objects directly from Jess work same as Java code, including defining new classes. (bind?ht (new java.util.hashmap)) <Java-Object:java.util.HashMap> (call?ht put "key1" "element1") (?ht put "key2" "element2") Jess can access member variables of Java objects (bind?pt set (new and java.awt.point)) get (set-member?pt x 37) set-member and get-member work with instance variables;
17 Transferring values between Jess and Java code class jess.rete: public Value store(string name, Value val); public Value store(string name, Object val); public Value fetch(string name); public void clearstorage(); Functions in Jess: (store <name> <value>) (fetch <name>) (clear-storage) import jess.*; public class ExFetch {public static void main(string[] unused) throws JessException { Rete r = new Rete(); r.store("dimension", new java.awt.dimension(10, 10)); r.eval("(bind?list (list dimension (fetch DIMENSION)))"); r.eval("(printout t?list)"); } } C:> java ExFetch (dimension <Java-Object:java.awt.Dimension>)
18 Implementing Java interfaces with Jess function implement : name of an interface name of a deffunction, returns an object that implements that interface by calling that function. When any method of that interface is invoked, the deffunction will be called first argument will be the name of the interface function, then all the arguments of the interface function (import java.util.comparator) (deffunction compare(?name?s1?s2) (return ((?s1 touppercase) compareto (?s2 touppercase)))) (bind?c (implement Comparator using compare))
19 Using Jess in Java 2 main ways in which Java code can be used with Jess: Java can be used to extend Jess Jess library can be used from Java.
20 jess.rete class the rule engine itself each jess.rete object has its own working memory, agenda, rules, etc. create one or more jess.rete objects and manipulate them: load in the catalog data, load in the rules
21 instance of jess.rete - an instance of Jess Rete class exports methods for: adding, finding, and removing facts, rules, functions, and other constructs Rete class - facade for Jess library
22 create a jess.rete object. - default constructor (one that accepts no arguments): import jess.*;... Rete engine = new Rete();
23 executecommand method accepts a String argument and returns a jess.value Interpreted as an expression Return value = result of evaluation Only a single call to executecommand can be simultaneously executing on a given instance of jess.rete import jess.*;... Example: add a fact to Jess s working memory and get access to the jess.fact object Rete engine = new Rete(); Value v = engine.executecommand("(assert (color red))"); Fact f = v.factvalue(engine.getglobalcontext());
24 store, fetch work in both directions Some Jess functions are wrappers for methods in the jess.rete class: run(), run(int), reset(), clear(), assertfact(fact), retract(fact), retract(int), and halt() jess.rete.eval(java.lang.string) - execute, from Java, any Jess function call or construct definition that can be represented as a parseable String Rete r = new Rete(); r.eval("(deffunction square(?n)(return(*?n?n)))"); Value v = r.eval("(square 3)");
25 Working with facts construct jess.fact objects directly Rete method Jess equivalent adddeftemplate(deftemplate) (deftemplate) assertfact(fact) (assert fact) finddeftemplate(string) - findfactbyfact(fact) - findfactbyid(int) (fact-id number) retract(fact) (retract fact-id)
26 jess.fact class - subclass of ValueVector All the entries in the ValueVector correspond to slots of the Fact; data for the first slot is the item at index 0. The head or name of the fact is stored in a separate variable jess.fact - associated jess.deftemplate object (desc.) All Facts with a given head should share the same Deftemplate.
27 Adding Commands to Jess add user-defined functions to Jess import jess.*; public class ExAddUF { public add static new void functions main(string[] to argv) the throws Jess language: JessException { write // a Add class the that 'my-upcase' implements command the to Jess Rete jess.userfunction r = new Rete(); interface r.adduserfunction(new ExMyUpcase()); create // This a single will print instance "FOO of this class install System.out.println(r.eval("(my-upcase it into a jess.rete object foo)")); using } Rete.addUserfunction() } C:\> java ExAddUF Jess> (load-function ExMyUpcase) "FOO" Jess> (my-upcase foo) "FOO"
28 Create GUI in Jess Jess - incorporated as a library into graphical applications written in Java. write graphical applications in the Jess language: Implement the appropriate interface (import java.awt.*) (import java.awt.event.*) (defglobal?*f* = (new Frame "Button Demo")) ;; Create the widgets
29 Jess and XML Representing rules as XML Interoperability Editability Searchability RuleML Standard, but under development RHS not well supported JessML XML rule format can be transformed into Jess rules using an XSLT script
30 Example <?xml version="1.0"?> <!DOCTYPE rulebase SYSTEM "jess.dtd"> <rulebase> <rule name="animalrule2" priority="10"> <lhs> <pattern name="animal" binding="animal"> <slot name="has-hair"> <constant>true</constant> </slot> </pattern> </lhs> <rhs> <function-call> <head>modify</head> <variable>animal</variable> <constant>(type mammal)</constant> </function-call> </rhs> </rule> </rulebase> (defrule AnimalRule2 (declare (salience 10))?animal <- (animal (has-hair TRUE)) => (modify?animal (type mammal)))
31 See doc
Intelligent Systems: Reasoning and Recognition. CLIPS: RULE Syntax, Actions, The RETE Algorithm. Production System Architecture...
Intelligent Systems: Reasoning and Recognition James L. Crowley ENSIMAG 2 / MoSIG M1 Second Semester 2014/2015 Lesson 5 25 February 2015 CLIPS: RULE Syntax, Actions, The RETE Algorithm Production System
More information2AIT503 - EXPERT SYSTEMS. Lecture 4: Representing Facts and Writing Rules. Dr Dimitris C. Dracopoulos
2AIT503 - EXPERT SYSTEMS Lecture 4: Representing Facts and Writing Rules Dr Dimitris C. Dracopoulos email: d.dracopoulos@westminster.ac.uk Course web page: http://hscs.wmin.ac.uk/~dracopd/docum/courses/2ait503/ait503.html
More informationJessTab Manual. Integration of Protégé and Jess. Henrik Eriksson. Linköping University.
February 10, 2003 JessTab Manual Integration of Protégé and Jess Henrik Eriksson Linköping University her@ida.liu.se Note: Read the installation instructions before attempting to install JessTab. Introduction
More informationJess 7.0p1. The Rule Engine for the Java Platform. Ernest Friedman-Hill Sandia National Laboratories
Jess 7.0p1 The Rule Engine for the Java Platform Ernest Friedman-Hill Sandia National Laboratories Table of Contents Introduction...1 1. Getting Started...3 1.1. Requirements...3 1.2. Getting ready...4
More informationJess The Rule Engine for the Java Platform
Jess The Rule Engine for the Java Platform Version 7.1 July 8, 2008 Ernest Friedman-Hill Sandia National Laboratories Table of Contents Introduction... 1 1. Getting Started... 3 1.1. Requirements... 3
More informationIntelligent Systems: Reasoning and Recognition. Rule based programming - Introduction to CLIPS 6.0. Production System Architecture...
Intelligent Systems: Reasoning and Recognition James L. Crowley ENSIMAG 2 / MoSIG M1 Second Semester 2015/2016 Lesson 14 6 April 2016 Rule based programming - Introduction to CLIPS 6.0 Production System
More informationIntelligent Systems: Reasoning and Recognition. Rule based programming - Introduction to CLIPS 6.0
Intelligent Systems: Reasoning and Recognition James L. Crowley ENSIMAG 2 / MoSIG M1 Second Semester 2010/2011 Lesson 5 16 February 2011 Rule based programming - Introduction to CLIPS 6.0 Production Systems...2
More informationDefining an Abstract Core Production Rule System
WORKING PAPER!! DRAFT, e.g., lacks most references!! Version of December 19, 2005 Defining an Abstract Core Production Rule System Benjamin Grosof Massachusetts Institute of Technology, Sloan School of
More informationJess: A Production System Language Agent Based Virtual Worlds
Jess: A Production System Language 4.209 Agent Based Virtual Worlds Jess Knowledge Base A rule-based system maintains a collection of knowledge nuggets called facts. This collection is known as the knowledge
More informationIntroduction to CLIPS
Introduction to CLIPS Overview of CLIPS Facts Rules Rule firing Control techniques Example CS 460, Session 21 1 CLIPS basic elements Fact-list: global memory of data Knowledge-base: contain all the rules
More informationCPE/CSC 481: Knowledge-Based Systems
CPE/CSC 481: Knowledge-Based Systems Franz J. Kurfess Computer Science Department California Polytechnic State University San Luis Obispo, CA, U.S.A. 1 Rule-Based Reasoning Motivation & Objectives Rule-based
More information1. The jessinjade Package
1. The jessinjade Package We call "Jess agents" those agents that are JADE agents, since they extend the JADE "Agent" class, but whose initial beliefs and behaviour are defined in the Jess language. The
More informationProtégé Plug-in Library: A Task-Oriented Tour
Protégé Plug-in Library: A Task-Oriented Tour Tutorial at Seventh International Protégé Conference Bethesda MD, July 6 2004 Samson Tu and Jennifer Vendetti Stanford Medical Informatics Stanford University
More informationOverview of expert system shells
Overview of expert system shells Krzysztof Kaczor, Szymon Bobek, Grzegorz J. Nalepa Institute of Automatics AGH University of Science and Technology, Poland In»ynieria wiedzy 12.05.2010, Kraków http://geist.agh.edu.pl
More informationCLIPS C LANGUAGE INTEGRATED PRODUCTION SYSTEM
CLIPS C LANGUAGE INTEGRATED PRODUCTION SYSTEM Lecture# 4 Expert System lab Work INTRODUCTION Representation and Reasoning Knowledge Environment in CLIPS 3 Main Component Set Of fact to make rules Set Of
More information26:198:722 Expert Systems
26:198:722 Expert Systems Machine learning Rule-based Expert Systems CLIPS Machine Learning ASSISTANT uses Binarization -------------Attributes------------- ---Decision--- Height Hb Hr Hd Eyes Attractiveness
More informationIntelligent Systems: Reasoning and Recognition. Rule based programming - Forward chaining
Intelligent Systems: Reasoning and Recognition James L. Crowley ENSIMAG 2 / MoSIG M1 Second Semester 2015/2016 Lesson 13 1 April 2016 Rule based programming - Forward chaining Production Systems...2 Production
More informationLesson 3 Transcript: Part 1 of 2 - Tools & Scripting
Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting Slide 1: Cover Welcome to lesson 3 of the db2 on Campus lecture series. Today we're going to talk about tools and scripting, and this is part 1 of 2
More informationThe Control Flow in CLIPS
Cristian Giumale / Lecture Notes 1 The Control Flow in CLIPS Opposite to conventional programming languages, where the control flow is fully explicit, CLIPS offers two levels of data-driven control: The
More informationCSCE3193: Programming Paradigms
CSCE3193: Programming Paradigms Nilanjan Banerjee University of Arkansas Fayetteville, AR nilanb@uark.edu http://www.csce.uark.edu/~nilanb/3193/s10/ Programming Paradigms 1 Java Packages Application programmer
More informationCLIPS representation of ontology classes in an ontology-driven information system builder part 1
CLIPS representation of ontology classes in an ontology-driven information system builder part 1 Samuil Nikolov Abstract: The paper describes the structure of a CLIPS program representing an ontology class
More informationClass, Variable, Constructor, Object, Method Questions
Class, Variable, Constructor, Object, Method Questions http://www.wideskills.com/java-interview-questions/java-classes-andobjects-interview-questions https://www.careerride.com/java-objects-classes-methods.aspx
More informationSTRUCTURING OF PROGRAM
Unit III MULTIPLE CHOICE QUESTIONS 1. Which of the following is the functionality of Data Abstraction? (a) Reduce Complexity (c) Parallelism Unit III 3.1 (b) Binds together code and data (d) None of the
More informationECE 122. Engineering Problem Solving with Java
ECE 122 Engineering Problem Solving with Java Lecture 12 Arrays of Objects Outline Problem: How can I represent groups of objects in an array Previously considered arrays of primitives This can get complicated
More informationRule-Based Systems in Java IN ACTION. Ernest Friedman-Hill
Rule-Based Systems in Java IN ACTION Ernest Friedman-Hill M A N N I N G Adding a graphical interface In this chapter you ll Create a window Fill it with graphical components Write event handlers all from
More informationIntroduction to Programming Using Java (98-388)
Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;
More informationReview what constitutes a thread Creating threads general Creating threads Java What happens if synchronization is not used? Assignment.
Review what constitutes a thread Creating threads general Creating threads Java What happens if synchronization is not used? Assignment Overview What constitutes a thread? Instruction pointer Stack space
More informationUsing the Jess Rule Engine to Evaluate Authorization Policies
University of Hamburg Department of Informatics Security in Distributed Systems Sicherheit in Verteilten Systemen (SVS) Using the Jess Rule Engine to Evaluate Authorization Policies Baccalaureate Thesis
More informationIntroduction to Java
Introduction to Java Module 1: Getting started, Java Basics 22/01/2010 Prepared by Chris Panayiotou for EPL 233 1 Lab Objectives o Objective: Learn how to write, compile and execute HelloWorld.java Learn
More informationIS-A is a way of saying: This object is a type of that object. Let us see how the extends keyword is used to achieve inheritance.
PART 17 17. Inheritance Inheritance can be defined as the process where one object acquires the properties of another. With the use of inheritance the information is made manageable in a hierarchical order.
More informationExam in TDDB84: Design Patterns,
Exam in TDDB84: Design Patterns, 2014-10-24 14-18 Information Observe the following, or risk subtraction of points: 1) Write only the answer to one task on one sheet. Use only the front side of the sheets
More informationObjects and Iterators
Objects and Iterators Can We Have Data Structures With Generic Types? What s in a Bag? All our implementations of collections so far allowed for one data type for the entire collection To accommodate a
More informationCHAPTER 4: ARCHITECTURE AND SYSTEM DESIGN OF PROPOSED EXPERT SYSTEM: ESOA
CHAPTER 4: ARCHITECTURE AND SYSTEM DESIGN OF PROPOSED EXPERT SYSTEM: ESOA Pages: From 49 to 64 This chapter presents the Architecture, frameworf^and system design of the we6-6ased expert system. This chapter
More informationJava Programming. MSc Induction Tutorials Stefan Stafrace PhD Student Department of Computing
Java Programming MSc Induction Tutorials 2011 Stefan Stafrace PhD Student Department of Computing s.stafrace@surrey.ac.uk 1 Tutorial Objectives This is an example based tutorial for students who want to
More informationChapter 4 - Constructing the advice KB-DSS
Chapter 4 - Constructing the advice KB-DSS The aim of this study is to provide a KB-DSS to students to select realistic relevant courses to support the completion of their current qualification in the
More informationJava Collection Framework
Java Collection Framework Readings Purpose To provide a working knowledge of the Java Collections framework and iterators. Learning Objectives Understand the structure of the Java Collections framework
More informationTowards the Semantic Grid: Putting Knowledge to Work in Design Optimisation
Towards the Semantic Grid: Putting Knowledge to Work in Design Optimisation Feng Tao, Liming Chen, Nigel Shadbolt Department of Electronics and Computer Science, University of Southampton, UK {ft,lc,nrs}@ecs.soton.ac.uk
More informationAdvantage: high portability, low cost, and easy integra.on with external systems. It was wriien using the C programming language.
Tutorial 2 Introduc.on to CLIPS CLIPS (C Language Integrated Produc.on System): A programming language designed by NASA/Johnson Space Center. Advantage: high portability, low cost, and easy integra.on
More informationCSE 70 Final Exam Fall 2009
Signature cs70f Name Student ID CSE 70 Final Exam Fall 2009 Page 1 (10 points) Page 2 (16 points) Page 3 (22 points) Page 4 (13 points) Page 5 (15 points) Page 6 (20 points) Page 7 (9 points) Page 8 (15
More informationSyllabus & Curriculum for Certificate Course in Java. CALL: , for Queries
1 CONTENTS 1. Introduction to Java 2. Holding Data 3. Controllin g the f l o w 4. Object Oriented Programming Concepts 5. Inheritance & Packaging 6. Handling Error/Exceptions 7. Handling Strings 8. Threads
More informationC# Programming for Developers Course Labs Contents
C# Programming for Developers Course Labs Contents C# Programming for Developers...1 Course Labs Contents...1 Introduction to C#...3 Aims...3 Your First C# Program...3 C# The Basics...5 The Aims...5 Declaring
More informationstanford hci group / cs376 UI Software Tools Scott Klemmer 14 October research topics in human-computer interaction
stanford hci group / cs376 UI Software Tools Scott Klemmer 14 October 2004 research topics in human-computer interaction http://cs376.stanford.edu cs547 tomorrow: Scott Snibbe Body, Space, and Cinema 2
More informationMORE OO FUNDAMENTALS CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 4 09/01/2011
MORE OO FUNDAMENTALS CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 4 09/01/2011 1 Goals of the Lecture Continue a review of fundamental object-oriented concepts 2 Overview of OO Fundamentals
More informationChapter 4 Defining Classes I
Chapter 4 Defining Classes I This chapter introduces the idea that students can create their own classes and therefore their own objects. Introduced is the idea of methods and instance variables as the
More informationLecture Notes CPSC 224 (Spring 2012) Today... Java basics. S. Bowers 1 of 8
Today... Java basics S. Bowers 1 of 8 Java main method (cont.) In Java, main looks like this: public class HelloWorld { public static void main(string[] args) { System.out.println("Hello World!"); Q: How
More informationExam Questions 1Z0-895
Exam Questions 1Z0-895 Java Platform, Enterprise Edition 6 Enterprise JavaBeans Developer Certified Expert Exam https://www.2passeasy.com/dumps/1z0-895/ QUESTION NO: 1 A developer needs to deliver a large-scale
More informationNon-numeric types, boolean types, arithmetic. operators. Comp Sci 1570 Introduction to C++ Non-numeric types. const. Reserved words.
, ean, arithmetic s s on acters Comp Sci 1570 Introduction to C++ Outline s s on acters 1 2 3 4 s s on acters Outline s s on acters 1 2 3 4 s s on acters ASCII s s on acters ASCII s s on acters Type: acter
More informationCSE331 Winter 2014, Final Examination March 17, 2014 Please do not turn the page until 8:30. Rules:
CSE331 Winter 2014, Final Examination March 17, 2014 Please do not turn the page until 8:30. Rules: The exam is closed-book, closed-note, etc. Please stop promptly at 10:20. There are 116 points total,
More informationDevelopment environments for ontology definition and knowledge modeling
Using JessTab to Integrate Protégé and Jess Henrik Eriksson, Linköping University Development environments for ontology definition and knowledge modeling require integration with other types of software
More informationWeb Site Development with HTML/JavaScrip
Hands-On Web Site Development with HTML/JavaScrip Course Description This Hands-On Web programming course provides a thorough introduction to implementing a full-featured Web site on the Internet or corporate
More informationMan, Marriage and Machine Adventures in Artificial Advice. Asheesh Goja April 2011 Dumont, NJ
Man, Marriage and Machine Adventures in Artificial Advice Asheesh Goja April 2011 Dumont, NJ Table of Contents Introduction... 5 Background... 6 What is an Expert System?... 6 Programming an Expert system...
More informationThe Java programming environment. The Java programming environment. Java: A tiny intro. Java features
The Java programming environment Cleaned up version of C++: no header files, macros, pointers and references, unions, structures, operator overloading, virtual base classes, templates, etc. Object-orientation:
More informationMidterms Save the Dates!
University of British Columbia CPSC 111, Intro to Computation Alan J. Hu (Using the Scanner and String Classes) Anatomy of a Java Program Readings This Week s Reading: Ch 3.1-3.8 (Major conceptual jump
More informationFirst Name: AITI 2004: Exam 2 July 19, 2004
First Name: AITI 2004: Exam 2 July 19, 2004 Last Name: JSP Track Read Instructions Carefully! This is a 3 hour closed book exam. No calculators are allowed. Please write clearly if we cannot understand
More informationCSCI 136 Written Exam #1 Fundamentals of Computer Science II Spring 2015
CSCI 136 Written Exam #1 Fundamentals of Computer Science II Spring 2015 Name: This exam consists of 5 problems on the following 7 pages. You may use your double- sided hand- written 8 ½ x 11 note sheet
More informationWeiss Chapter 1 terminology (parenthesized numbers are page numbers)
Weiss Chapter 1 terminology (parenthesized numbers are page numbers) assignment operators In Java, used to alter the value of a variable. These operators include =, +=, -=, *=, and /=. (9) autoincrement
More informationJ.43 The length field of an array object makes the length of the array available. J.44 ARRAYS
ARRAYS A Java array is an Object that holds an ordered collection of elements. Components of an array can be primitive types or may reference objects, including other arrays. Arrays can be declared, allocated,
More informationUnit E Step-by-Step: Programming with Python
Unit E Step-by-Step: Programming with Python Computer Concepts 2016 ENHANCED EDITION 1 Unit Contents Section A: Hello World! Python Style Section B: The Wacky Word Game Section C: Build Your Own Calculator
More informationJAVA WRAPPER CLASSES
JAVA WRAPPER CLASSES Description Each of Java's eight primitive data types has a class dedicated to it. These are known as wrapper classes, because they "wrap" the primitive data type into an object of
More informationMore OO Fundamentals. CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 4 09/11/2012
More OO Fundamentals CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 4 09/11/2012 1 Goals of the Lecture Continue a review of fundamental object-oriented concepts 2 Overview of OO Fundamentals
More informationPython Boot Camp. Day 3
Python Boot Camp Day 3 Agenda 1. Review Day 2 Exercises 2.Getting input from the user, Interview Lab 3.Scopes 4.Conditionals, Mood Ring Lab 5.Recursion, Recursion Lab Day 2 Exercises Think Python Ch. 3
More informationAn overview of Java, Data types and variables
An overview of Java, Data types and variables Lecture 2 from (UNIT IV) Prepared by Mrs. K.M. Sanghavi 1 2 Hello World // HelloWorld.java: Hello World program import java.lang.*; class HelloWorld { public
More informationPractice Questions for Final Exam: Advanced Java Concepts + Additional Questions from Earlier Parts of the Course
: Advanced Java Concepts + Additional Questions from Earlier Parts of the Course 1. Given the following hierarchy: class Alpha {... class Beta extends Alpha {... class Gamma extends Beta {... In what order
More informationFramework. Set of cooperating classes/interfaces. Example: Swing package is framework for problem domain of GUI programming
Frameworks 1 Framework Set of cooperating classes/interfaces Structure essential mechanisms of a problem domain Programmer can extend framework classes, creating new functionality Example: Swing package
More information1 Short Answer (15 Points Each)
Name: Write all of your responses on these exam pages. If you need extra space please use the backs of the pages. 1 Short Answer (15 Points Each) 1. Write the following Java declarations, (a) A double
More informationJava How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.
Java How to Program, 10/e Education, Inc. All Rights Reserved. Each class you create becomes a new type that can be used to declare variables and create objects. You can declare new classes as needed;
More informationMobile MOUSe JAVA2 FOR PROGRAMMERS ONLINE COURSE OUTLINE
Mobile MOUSe JAVA2 FOR PROGRAMMERS ONLINE COURSE OUTLINE COURSE TITLE JAVA2 FOR PROGRAMMERS COURSE DURATION 14 Hour(s) of Interactive Training COURSE OVERVIEW With the Java2 for Programmers course, anyone
More informationLecture 15. Arrays (and For Loops)
Lecture 15 Arrays (and For Loops) For Loops for (initiating statement; conditional statement; next statement) // usually incremental { body statement(s); The for statement provides a compact way to iterate
More informationStructured Knowledge Representation
Intelligent Systems: Reasoning and Recognition James L. Crowley ENSIMAG 2 / MoSIG M1 Second Semester 2015/2016 Lesson 17 15 April 2016 Structured Knowledge Representation Object Oriented Programming...2
More informationThis course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.
HTML5/CSS3/JavaScript Programming Course Summary Description This class is designed for students that have experience with basic HTML concepts that wish to learn about HTML Version 5, Cascading Style Sheets
More informationCMSC 202. Exceptions
CMSC 202 Exceptions Error Handling In the ideal world, all errors would occur when your code is compiled. That won t happen. Errors which occur when your code is running must be handled by some mechanism
More informationCSE wi Final Exam 3/12/18 Sample Solution
Question 1. (8 points, 2 each) Equality. Recall that there are several different notions of object equality that we ve encountered this quarter. In particular, we have the following three: Reference equality:
More informationReference Manual. Volume I Basic Programming Guide
Reference Manual Volume I Basic Programming Guide Version 6.20 March 31st 2002 CLIPS Basic Programming Guide Version 6.20 March 31st 2002 CONTENTS License Information...i Preface... iii Acknowledgements...
More informationWeek 7 - More Java! this stands for the calling object:
Week 7 - More Java! Variable Scoping, Revisited this Parameter Encapsulation & Principles of Information Hiding: Use of public and private within class API, ADT javadoc Variables of class Type Wrapper
More informationLast Class: Network Overview. Today: Distributed Systems
Last Class: Network Overview =>Processes in a distributed system all communicate via a message exchange. Physical reality: packets Abstraction: messages limited size arbitrary size unordered (sometimes)
More informationChapter 6 Introduction to Defining Classes
Introduction to Defining Classes Fundamentals of Java: AP Computer Science Essentials, 4th Edition 1 Objectives Design and implement a simple class from user requirements. Organize a program in terms of
More informationA Ubiquitous Process Coordination System for RFID/USN Events
Proceedings of the 2011 International Conference on Industrial Engineering and Operations Management Kuala Lumpur, Malaysia, January 22 24, 2011 A Ubiquitous Process Coordination System for RFID/USN Events
More information2 ADT Programming User-defined abstract data types
Preview 2 ADT Programming User-defined abstract data types user-defined data types in C++: classes constructors and destructors const accessor functions, and inline functions special initialization construct
More informationClass Libraries. Readings and References. Java fundamentals. Java class libraries and data structures. Reading. Other References
Reading Readings and References Class Libraries CSE 142, Summer 2002 Computer Programming 1 Other References» The Java tutorial» http://java.sun.com/docs/books/tutorial/ http://www.cs.washington.edu/education/courses/142/02su/
More informationC++11: 10 Features You Should be Using. Gordon R&D Runtime Engineer Codeplay Software Ltd.
C++11: 10 Features You Should be Using Gordon Brown @AerialMantis R&D Runtime Engineer Codeplay Software Ltd. Agenda Default and Deleted Methods Static Assertions Delegated and Inherited Constructors Null
More informationSoftware Verification and Functional Testing with XML Documentation
Software Verification and Functional Testing with XML Documentation Ernest J. Friedman-Hill Distributed Systems Research Department, MS 9012 Sandia National Laboratories Livermore, CA 94550 ejfried@ca.sandia.gov
More informationBackground. Reflection. The Class Class. How Objects Work
Background Reflection Turing's great insight: programs are just another kind of data Source code is text Manipulate it line by line, or by parsing expressions Compiled programs are data, too Integers and
More informationJAVASCRIPT BASICS. JavaScript String Functions. Here is the basic condition you have to follow. If you start a string with
JavaScript String Functions Description String constants can be specified by enclosing characters or strings within double quotes, e.g. "WikiTechy is the best site to learn JavaScript". A string constant
More informationLesson 4 Transcript: DB2 Architecture
Lesson 4 Transcript: DB2 Architecture Slide 1: Cover Welcome to Lesson 4 of the DB2 on campus series. Today we are going to talk about the DB2 architecture. My name is Raul Chong and I am the DB2 on Campus
More informationObject Oriented Programming with JAVA
Course Title Course Code Object Oriented Programming with JAVA CE306 Theory :03 Course Credit Practical :01 Tutorial :00 Credits :04 Course Learning Outcomes On the completion of the course, students will
More informationCMSC 331 Second Midterm Exam
1 20/ 2 80/ 331 First Midterm Exam 11 November 2003 3 20/ 4 40/ 5 10/ CMSC 331 Second Midterm Exam 6 15/ 7 15/ Name: Student ID#: 200/ You will have seventy-five (75) minutes to complete this closed book
More informationUniversity of Palestine. Mid Exam Total Grade: 100
First Question No. of Branches (5) A) Choose the correct answer: 1. If we type: system.out.println( a ); in the main() method, what will be the result? int a=12; //in the global space... void f() { int
More informationVariables of class Type. Week 8. Variables of class Type, Cont. A simple class:
Week 8 Variables of class Type - Correction! Libraries/Packages String Class, reviewed Screen Input/Output, reviewed File Input/Output Coding Style Guidelines A simple class: Variables of class Type public
More informationQueens College, CUNY Department of Computer Science. CS 212 Object-Oriented Programming in Java Practice Exam 2. CS 212 Exam 2 Study Guide
Topics for Exam 2: Queens College, CUNY Department of Computer Science CS 212 Object-Oriented Programming in Java Practice Exam 2 CS 212 Exam 2 Study Guide Linked Lists define a list node define a singly-linked
More information1.Which four options describe the correct default values for array elements of the types indicated?
1.Which four options describe the correct default values for array elements of the types indicated? 1. int -> 0 2. String -> "null" 3. Dog -> null 4. char -> '\u0000' 5. float -> 0.0f 6. boolean -> true
More informationAdvanced Systems Programming
Advanced Systems Programming Introduction to C++ Martin Küttler September 19, 2017 1 / 18 About this presentation This presentation is not about learning programming or every C++ feature. It is a short
More informationDaMPL. Language Reference Manual. Henrique Grando
DaMPL Language Reference Manual Bernardo Abreu Felipe Rocha Henrique Grando Hugo Sousa bd2440 flt2107 hp2409 ha2398 Contents 1. Getting Started... 4 2. Syntax Notations... 4 3. Lexical Conventions... 4
More informationJAVA CONCEPTS Early Objects
INTERNATIONAL STUDENT VERSION JAVA CONCEPTS Early Objects Seventh Edition CAY HORSTMANN San Jose State University Wiley CONTENTS PREFACE v chapter i INTRODUCTION 1 1.1 Computer Programs 2 1.2 The Anatomy
More informationMind Q Systems Private Limited
Software Testing Tools Introduction Introduction to software Testing Software Development Process Project Vs Product Objectives of Testing Testing Principals Software Development Life Cycle SDLC SDLC Models
More informationCSCI 136 Written Exam #0 Fundamentals of Computer Science II Spring 2013
CSCI 136 Written Exam #0 Fundamentals of Computer Science II Spring 2013 Name: This exam consists of 5 problems on the following 7 pages. You may use your single-side hand-written 8 ½ x 11 note sheet during
More informationCSE wi Final Exam 3/12/18. Name UW ID#
Name UW ID# There are 13 questions worth a total of 100 points. Please budget your time so you get to all of the questions. Keep your answers brief and to the point. The exam is closed book, closed notes,
More information(2½ hours) Total Marks: 75
(2½ hours) Total Marks: 75 N. B.: (1) All questions are compulsory. (2) Makesuitable assumptions wherever necessary and state the assumptions mad (3) Answers to the same question must be written together.
More informationPractical Objects: Test Driven Software Development using JUnit
1999 McBreen.Consulting Practical Objects Test Driven Software Development using JUnit Pete McBreen, McBreen.Consulting petemcbreen@acm.org Test Driven Software Development??? The Unified Process is Use
More informationMIT AITI Swing Event Model Lecture 17
MIT AITI 2004 Swing Event Model Lecture 17 The Java Event Model In the last lecture, we learned how to construct a GUI to present information to the user. But how do GUIs interact with users? How do applications
More informationCSCI-142 Exam 1 Review September 25, 2016 Presented by the RIT Computer Science Community
CSCI-12 Exam 1 Review September 25, 2016 Presented by the RIT Computer Science Community http://csc.cs.rit.edu 1. Provide a detailed explanation of what the following code does: 1 public boolean checkstring
More information