leadSinger(PersonX):-
is_a(PersonX, pupil),
likes(PersonX, karaoke),
voice(PersonX, amazing).
Rule with three SUB GOALS
For the overall goal to be true -> all subgoals must be true
The name of the diagram which allows us to visualise the relationship between the facts in a knowledge base is called ..... SEMANTIC NET
Monday, 10 January 2011
Friday, 7 January 2011
Prolog
Programmable Logic
Allows to define FACTS and RULES
These collected together are called a knowledge base
To represent the fact
"McAlpine loves Binary" - loves(mcalpine, binary). (intentionally lower case)
This only works one way!!!
To represent the fact
"I have a spearmint silver car, 03 plate, 3 door, petrol"
car(spearmintSilver, 03, 3, petrol).
male(homer).
parent(homer, bart).
to make a rule for dad ????
dad(DadX, Child):-
male(DadX), 'the person dadX must be male to be a DAD!
parent(DadX, Child).
Allows to define FACTS and RULES
These collected together are called a knowledge base
To represent the fact
"McAlpine loves Binary" - loves(mcalpine, binary). (intentionally lower case)
This only works one way!!!
To represent the fact
"I have a spearmint silver car, 03 plate, 3 door, petrol"
car(spearmintSilver, 03, 3, petrol).
male(homer).
parent(homer, bart).
to make a rule for dad ????
dad(DadX, Child):-
male(DadX), 'the person dadX must be male to be a DAD!
parent(DadX, Child).
Tuesday, 16 November 2010
Loops and Stuff
3 types of Loop
Nested Loop - loop inside other loops
Conditional Loop - will loop until a specified condition is met
Fixed Loop - loops a set number of times every time
Macro
we can record a set of instructions and get them to repeat by pressing a key stroke (or shortcut which we assign it)
Pre-Defined Functions
int() round() rnd()
commands in programming language, they are already written and we can use them
Nested Loop - loop inside other loops
Conditional Loop - will loop until a specified condition is met
Fixed Loop - loops a set number of times every time
Macro
we can record a set of instructions and get them to repeat by pressing a key stroke (or shortcut which we assign it)
Pre-Defined Functions
int() round() rnd()
commands in programming language, they are already written and we can use them
Friday, 12 November 2010
Compter Languages
Machine Code - the language that computers understand, represented as binary (1,0) and as an electrical charge in the computer system
We program in HLL High Level Languages
+ Must be translated before execution
+ English like language
+ They are portable
LLL - Low Level Languages
- understood by the components and the processor etc etc etc
Translators
+ Compiler - translates and executes each line of code at the same time
+ runs faster, because it gives you an executable file once there are no errors
- not good for debugging, gives you all your errors at once
+ Interpreter - translates and executes each line of code one at a time
+ stop when it finds an error, easier to debug
- slower, must run and translate every time, Interpreter is always running during interpretation
We program in HLL High Level Languages
+ Must be translated before execution
+ English like language
+ They are portable
LLL - Low Level Languages
- understood by the components and the processor etc etc etc
Translators
+ Compiler - translates and executes each line of code at the same time
+ runs faster, because it gives you an executable file once there are no errors
- not good for debugging, gives you all your errors at once
+ Interpreter - translates and executes each line of code one at a time
+ stop when it finds an error, easier to debug
- slower, must run and translate every time, Interpreter is always running during interpretation
From I onwards
I - Implementation
+ choose which language to write the program in (Visual Basic etc)
+ We simply enter in programming language to a Text Editor
T - Testing
Examples do while age < 0 or age > 100
+ Normal - a test within the boundaries of expected input - 50, 60, 44, 98
+ Extreme - testing on the boundaries of expected input - 0, 100
+ Exceptional - test outwith the boundaries of expected input - 111, "Lion", -1
= Fully Testing is where you carry out tests using each of the three types of test
D - Documentation
+ User Guide - contains how to use the program (after its been installed), controls etc
+ Technical Guide - specifications of the program (requirements) e.g. Minimum Memory Requirements, Minimum Processor Speed, Compatible Operating Systems
E- Evaluation
+ Readability - how easy the program is to read and understand for other programmers
!!!! - Ways to improve readability
- indentation, blank lines, comments, good variable names
+ Fitness for Purpose - Does it do what its supposed to do! (Software Spec.)
+ User Interface - user friendly, easy to use
M - Maintenance
+ Perfective - program does what its supposed to do, but we add new features that weren't in Software Specification
+ Corrective - fix any errors that are not found during testing
+ Adaptive - change the program for different platforms (different processors, OS, Hardware)
+ choose which language to write the program in (Visual Basic etc)
+ We simply enter in programming language to a Text Editor
T - Testing
Examples do while age < 0 or age > 100
+ Normal - a test within the boundaries of expected input - 50, 60, 44, 98
+ Extreme - testing on the boundaries of expected input - 0, 100
+ Exceptional - test outwith the boundaries of expected input - 111, "Lion", -1
= Fully Testing is where you carry out tests using each of the three types of test
D - Documentation
+ User Guide - contains how to use the program (after its been installed), controls etc
+ Technical Guide - specifications of the program (requirements) e.g. Minimum Memory Requirements, Minimum Processor Speed, Compatible Operating Systems
E- Evaluation
+ Readability - how easy the program is to read and understand for other programmers
!!!! - Ways to improve readability
- indentation, blank lines, comments, good variable names
+ Fitness for Purpose - Does it do what its supposed to do! (Software Spec.)
+ User Interface - user friendly, easy to use
M - Maintenance
+ Perfective - program does what its supposed to do, but we add new features that weren't in Software Specification
+ Corrective - fix any errors that are not found during testing
+ Adaptive - change the program for different platforms (different processors, OS, Hardware)
Monday, 1 November 2010
Dancing!
The Software Development Process is an Iterative Process
We can remember the stages in the correct order by remembering
A Dance In The Dark Every Monday
The first stage is the Analysis
The document produced at this stage is called Software Specification
This document is a legally binding contract stating what the Software MUST do
The second stage is the Design stage
There are 3 different approaches to this Pseudocode, Structure Diagram and Flow Diagram
The two of these which are Graphical Design Notations are Structure and Flow Diagrams
We can remember the stages in the correct order by remembering
A Dance In The Dark Every Monday
The first stage is the Analysis
The document produced at this stage is called Software Specification
This document is a legally binding contract stating what the Software MUST do
The second stage is the Design stage
There are 3 different approaches to this Pseudocode, Structure Diagram and Flow Diagram
The two of these which are Graphical Design Notations are Structure and Flow Diagrams
Wednesday, 20 October 2010
Computer Software
Operating Systems
most important program on the computer system
Starts when the computer is turned on running constantly until it is turned off (the computer)
Jobs of the OS
+ Controls the Input and Output Devices
+ Reports Errors
+ Controls Security
+ Provides the Human Computer Interface (HCI)
+ Controls where items are stored in memory
+ Schedules tasks (virus scans, updates etc)
* OS that we know. Windows 95, 2000, XP, Vista, 7, 98 ME, Linux, Apple Tiger, Apple OS X
Application Programs
perform specific tasks - Word Processing, Presentation, Spreadsheets, Graphics, Desktop Publishing
Saving in Standard File Formats
so that programs or documents saved on one computer system or application program will open in another different application program
Standard File Formats for Graphics
JPEG, GIF, BMP,
Standard File Formats for Text
TXT, RTF (Rich Text Format) ASCII
RTF stores some formatting information
Objects and Operations
Objects - Text, Graphics, Graphs, Cells, Rows, Columns, File, Records, Fields, Circle, Square, Line,
Operations - Copy, Paste, Cut, Insert, Crop, Rotate, Scale
Viruses
- infects your computer and makes it perform involuntary tasks - destructive piece of code
*Symptoms*
Slow your computer down
Applications dont work properly
Takes up processor
Recieve uncommon error messages
Computer Crashes (reboots unexpectedly)
*Causes of Infection*
Dodgy websites (gaming)
CDs from friends
Email - attachments
Peer to peer downloads - ShareZa, LimeWire
*Protect Yourself*
Anti Virus Software
Anti Malware
Anti Spyware
Firewalls
and running these often
most important program on the computer system
Starts when the computer is turned on running constantly until it is turned off (the computer)
Jobs of the OS
+ Controls the Input and Output Devices
+ Reports Errors
+ Controls Security
+ Provides the Human Computer Interface (HCI)
+ Controls where items are stored in memory
+ Schedules tasks (virus scans, updates etc)
* OS that we know. Windows 95, 2000, XP, Vista, 7, 98 ME, Linux, Apple Tiger, Apple OS X
Application Programs
perform specific tasks - Word Processing, Presentation, Spreadsheets, Graphics, Desktop Publishing
Saving in Standard File Formats
so that programs or documents saved on one computer system or application program will open in another different application program
Standard File Formats for Graphics
JPEG, GIF, BMP,
Standard File Formats for Text
TXT, RTF (Rich Text Format) ASCII
RTF stores some formatting information
Objects and Operations
Objects - Text, Graphics, Graphs, Cells, Rows, Columns, File, Records, Fields, Circle, Square, Line,
Operations - Copy, Paste, Cut, Insert, Crop, Rotate, Scale
Viruses
- infects your computer and makes it perform involuntary tasks - destructive piece of code
*Symptoms*
Slow your computer down
Applications dont work properly
Takes up processor
Recieve uncommon error messages
Computer Crashes (reboots unexpectedly)
*Causes of Infection*
Dodgy websites (gaming)
CDs from friends
Email - attachments
Peer to peer downloads - ShareZa, LimeWire
*Protect Yourself*
Anti Virus Software
Anti Malware
Anti Spyware
Firewalls
and running these often
Subscribe to:
Posts (Atom)