Wednesday, December 7, 2011
Introduction To Object Oriented Programming
Introduction To Object Oriented Programming
By: razi.smartcomputing123@gmail.com
OOP Concept
The following part is extracted from: http://en.wikipedia.org/wiki/Object-oriented_programming
What is Object Oriented Programming?
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs.
What is Programming Paradigm?
Programming Paradigm simply means the way programmers look at problem solving approach using computers.
Example type of paradigm
Procedure Oriented Programming, i.e. Programmers writes instructions in block of codes that carry out specific action.
This paradigm has some limitations and OOP concept is now receiving attention.
What does “object” in OOP mean?
Object is a kind of Data Structure that consists of data (properties) and procedures (methods) to work with them.
Object is the natural way we recognize entities in the real world, for e.g, a postman (an object) is a person (known by his name and employee number) that delivers parcels (his associated role)
What are other examples of “Object”?
A Washing Machine
Properties: (Machine Serial Number, Wash_Type, Rinse_Type, Spin_Type)
Methods: (Wash, Rinse, Spin)
Exam Session Manager;
Properties: (Exam Date, Subject, Candidate_Lists, Session_Status)
Methods: (Register_Candidate, Run_Session, Close_Session)
What is the problem of non-OOP program?
Simple, non-OOP programs may be one "long" list of statements (or commands).
More complex programs will often group smaller sections of these statements into functions or subroutines each of which might perform a particular task.
With designs of this sort, it is common for some of the program's data to be 'global', i.e. accessible from any part of the program.
As programs grow in size, allowing any function to modify any piece of data means that bugs can have wide-reaching effects.
How does OOP address the ‘global’ data issue in non-OOP program?
object-oriented approach encourages the programmer to place data where it is not directly accessible by the rest of the program.
Instead, the data is accessed by calling specially written functions, commonly called methods, which are either bundled in with the data.
This protects the consistency of the data.
The following part is extracted from: http://www.jrobbins.org/ics121f03/lesson-uml-structure.html
OOP and UML Modeling
Why make models?
Software systems are very complex and hard to understand
Models are abstractions of systems:
They express certain aspects of the system and ignore others
They are less complex and easier to understand
Models can make certain aspects more clearly visible than in the real system
What can you do with models?
Express your ideas and communicate with other engineers
Reason about the system: detect errors, predict qualities
Generate parts of the real system: code, schemas
Reverse-engineer the real system to make a model
What is UML?
Unified Modeling Language
A modeling language standardized between 1995 and 1997 by Rational, IBM, HP, Microsoft, Oracle, MCI, Unisys, DEC, and others
“Unified” means:
Unified existing approaches to OO design notations: Booch, OMT, Objectory, and Statecharts
Unified notation used in multiple phases of development: Requirements, design, and implementation
Unified industry interest, training, and skills/job market
The UML notation consists of:
Class diagrams
Object diagrams
Use case diagrams
Collaboration diagrams
Sequence diagrams
Statechart diagrams
Activity diagrams
Component and deployment diagrams
UML Class Diagram
Class Diagram shows the structure of a class (template for object), i.e the Class Name, Properties and Methods
WASHING MACHINE
Machine_No
Wash_Type
Rinse_Type
Spin_Type
Wash()
Rinse()
Spin()
EXAM SESSION MANAGER
Exam_Date
Exam_Subject
Candidate_Lists
Session_Status
RegisterCandidate()
RunSession()
CloseSession()
UML Use Case Diagram
Use Case Diagram shows the behavior of an object
Washing
Machine
Wash
Rinse
Spin
Exam Session Manager
Register
Run
Close
Sunday, December 4, 2011
Saturday, December 3, 2011
Basic Problem Solving Using Computers 1
By: razi.smartcomputing123@gmail.com
Pre-requisite
You are expected to know the following topics before moving to the next slides. Click the links to learn more about them.
What is Computer Programming? (learn more)
What is ideone.com compiler? (learn more)
How to write the basic program structure? (learn more)
Introduction
This presentation demonstrates the concept of problem-solving using computer machine.
All codes can be tested on ideone.com compiler.
What are the advantages of using computer to solve problem?
Computer processing is fast,
millions instructions executed per second
Computer is a reliable processing agent;
it follows instructions exactly as they are.
Computer is consistent;
no such thing as tiredness,
Computer has efficient memory;
huge data collection can be kept in relatively small physical space.
Types of problem that can be solved through programming
Problem can be solved through programming if it can be expressed either as
Arithmetic form, or
Logic form
To perform computer processing we need…
Algorithm
Steps to perform processing
Data Structures
To hold the values prior to, during and post processing
Control Structures
To control program statement execution
These 3 elements are required for computer processing
Algorithm
Narrative Format (Pseudo-Code)
BEGIN
READ integer1, integer2
LET integer3=integer1 + integer2
PRINT integer3
END
Visual Format (Flow Chart)
BEGIN
READ integer1, integer2
LET integer3=integer1 + integer2
PRINT integer3
END
Data Structure
Describe the structure that contains the data value.
Must be designed correctly to achieve efficiency.
Basic data types:
Numbers; integer or decimal point
Text; a character or strings (group of characters)
Compound data types:
Array
Control Structures
Later, we shall see some variations of control structures to add programming flexibility
Problem 1 : Finding area of dimensions
The following table provides a mathematical formula to calculate area for various shapes. Write a program to implement this.
Shape
Formula
Input Values
Rectangle
length x width
Length=5, width=6
Triangle
½ x length x width
Length=3, width=4
Circle
PI x r2
R=2.4
Solution 1a. Area of rectangle
C++
#include «iostream»
using namespace std;
int main() {
int length, width,rectangle;
length=5;
width=6;
rectangle=length * width;
cout«« "area= "««rectangle;
return 0;
}
VB.net
Imports System
Public Class Test
Public Shared Sub Main()
Dim length,width,rectangle as integer
length=5
width=6
rectangle=length * width
Console.WriteLine("area= " & rectangle)
End Sub
End Class
Line 4 declares integer variables. Line 5,6,7 sets the value of the variables. Line 8 outputs the result.
Solution 1b. Area of triangle
C++
#include «iostream»
using namespace std;
int main() {
double length, width, triangle;
length=5;
width=6;
triangle=0.5 * length * width;
cout«« "area= "««triangle;
return 0;
}
VB.net
Imports System
Public Class Test
Public Shared Sub Main()
Dim length,width,triangle as double
length=5
width=6
triangle=0.5*length * width
Console.WriteLine("area= " & triangle)
End Sub
End Class
Line 4 declares integer variables. Line 5,6,7 sets the value of the variables. Line 8 outputs the result.
Solution 1c. Area of circle
C++
#include «iostream»
using namespace std;
int main() {
double PI, radius;
PI=3.14;
radius=2.4;
circle=PI * radius * radius;
cout«« "area= " ««circle;
return 0;
}
VB.net
Imports System
Public Class Test
Public Shared Sub Main()
Dim PI, radius as double
PI=3.14
radius=2.4
circle=PI * radius * radius
Console.WriteLine("area= " & circle)
End Sub
End Class
Line 4 declares integer variables. Line 5,6,7 sets the value of the variables. Line 8 outputs the result.
Problem 2 : Assigning Grades
Student marks range from 0 to 100
Their marks correspond to the grades based on the table below.
Write a program to assign grades to the input marks value.
Min Value
Max Value
Grade
0
39
F
40
59
C
60
79
B
80
100
A
Solution 2. Grades
C++ (http://ideone.com/mO3Lr)
#include «iostream»
using namespace std;
int main() {
double marks;
char grade;
cin»» marks;
if ((marks»=0) && (marks«=39)) {grade='F';}
if ((marks»=40) && (marks«=59)) {grade='C';}
if ((marks»=60) && (marks«=79)) {grade='B';}
if ((marks»=80) && (marks«=100)) {grade='B';}
cout««grade;
return 0;
}
VB.net (http://ideone.com/RirLS)
Imports System
Public Class Test
Public Shared Sub Main()
Dim marks as double
Dim grade as string
marks=val(console.ReadLine())
if ((marks»=0) and (marks«=39)) then grade="F"
if ((marks»=40) and (marks«=59)) then grade="C"
if ((marks»=60) and (marks«=79)) then grade="B"
if ((marks»=80) and (marks«=100)) then grade="B"
Console.WriteLine(grade)
End Sub
End Class
Line 4,5 declares integer variables. Line 6 gets the input value. Line 7,8,9,10 selectively sets the value of the variables. Line 8 outputs the result.
Problem 3 : Login Module
You are required to write codes for login process.
The input_pin value will be compared against the pin value (hardcoded as 1234)
Login trials is limited to 3 times only.
Use WHILE DO(…) LOOP to implement the solution.
Solution 3. Login Module
C++ (http://ideone.com/0CuYI)
#include «iostream»
using namespace std;
int main() {
int pin, input_pin;
int trial,logged;
trial=0;
logged=0;
pin=1234;
while ((trial«3) && (logged==0)) {
cin»»input_pin;
if (input_pin==pin) {
logged=1;}
else {
logged=0;
}
cout««"Trial:"««trial««",Logged:"««logged««endl;
trial++;
}
return 0;
}
VB.net (http://ideone.com/GsXo4)
Imports System
Public Class Test
Public Shared Sub Main()
Dim pin, input_pin as integer
Dim trial, logged as integer
trial=0
logged=0
pin=1234
While (trial«3) and (logged=0)
input_pin=val(console.ReadLine())
If (input_pin=pin) Then
logged=1
Else
logged=0
End If
Console.WriteLine("Trial:" & trial & ",Logged:" & logged)
trial +=1
End While
End Sub
End Class
Line 4,5 declares integer variables. Line 6,7,8 sets initial value for variables. Line 10 gets the input value. Line 11-15 evaluates the input and sets the logged value. Line 9-10 contains the WHILE () DO ...LOOP
Next topics:
More Control Structures
Friday, December 2, 2011
Writing basic program structure using ideone.com compiler
By: razi.smartcomputing123@gmail.com
Pre-requisite
You are expected to know the following topics before moving to the next slides. Click the links to learn more about them.
What is Computer Programming? (learn more)
What is ideone.com compiler? (learn more)
Introduction
This presentation demonstrates the application of basic control structure using C++ and VB.net language.
All codes can be tested on ideone.com compiler.
3 Basic Control Structures
Source Code Templates
C++
#include «iostream»
using namespace std;
int main() {
return 0;
}
VB.net
Imports System
Public Class Test
Public Shared Sub Main()
End Sub
End Class
The followings are the source code templates that is provided by ideone.com
Use this template as a starting point for you to do the programming exercises.
Sequential Control Structure
C++
#include «iostream»
using namespace std;
int main() {
cout««"Hello World"««endl;
cout««"........... "««endl;
return 0;
}
Sequential Control Structure is the default control structure, i.e computer execute statements one after another in top-down direction unless told otherwise.
The following codes display “Hello World” on the first line and dots on the second line.
Sequential Control Structure
Visual Basic .NET
Imports System
Public Class Test
Public Shared Sub Main()
Console.WriteLine("Hello World" & vbCrLf)
Console.WriteLine("..........." & vbCrLf)
Console.ReadLine() 'Wait for key to be pressed
End Sub
End Sub
Sequential Control Structure is the default control structure, i.e computer execute statements one after another in top-down direction unless told otherwise.
The following codes display “Hello World” on the first line and dots on the second line.
Sequential Control Structure & Variable Declaration
C++
#include «iostream»
using namespace std;
int main() {
int num1;
int num2;
int num3;
num1=1;
num2=2;
num3=num1+num2;
cout««"The output is "««num3««endl;
return 0;
}
Line 4,5,6 declare integer variables. Line 7,8,9 assign values to them. Line 10 outputs the value.
Sequential Control Structure & Variable Declaration
Visual Basic .NET
Imports System
Public Class Test
Public Shared Sub Main()
Dim num1 as integer
Dim num2 as integer
Dim num3 as integer
num1=1
num2=2
num3=num1+num2
Console.WriteLine("The output is " & num3 & vbCrLf)
End Sub
End Class
Line 4,5,6 declare integer variables. Line 7,8,9 assign values to them. Line 10 outputs the value.
Selection Control Structure
C++
#include «iostream»
using namespace std;
int main() {
int iMark;
iMark=50;
if (iMark»=40) {
cout««"Pass!"««endl;}
else {
cout««"Failed!"««endl;}
return 0;
}
Line 5 assigns the value for iMark. Line 6 evaluate whether the value is greater than or equals to 40. If TRUE, PRINT “Pass!”. Otherwise, PRINT “Failed!”
Selection Control Structure
Visual Basic .NET
Imports System
Public Class Test
Public Shared Sub Main()
Dim iMark as integer
iMark=50
if (iMark»=40) then
Console.WriteLine("Pass!" & vbCrLf)
else
Console.WriteLine("Failed!" & vbCrLf)
end if
End Sub
End Class
Line 5 assigns the value for iMark. Line 6 evaluate whether the value is greater than or equals to 40. If TRUE, PRINT “Pass!”. Otherwise, PRINT “Failed!”
Loop Control Structure
C++
#include «iostream»
using namespace std;
int main() {
int iMark;
iMark=30;
while (iMark«40) {
cout««iMark««endl;
iMark++;
}
return 0;
}
Line 5 assigns the value for iMark. Line 6 evaluate whether the value is less than 40. If it is TRUE, run a loop and add 1 to iMark in each loop. Line 8 uses increment operator ++
Loop Control Structure
Visual Basic .NET
Imports System
Public Class Test
Public Shared Sub Main()
Dim iMark as integer
iMark=30
do while (iMark«40)
Console.WriteLine(iMark & vbCrLf)
iMark+=1
loop
End Sub
End Class
Line 5 assigns the value for iMark. Line 6 evaluate whether the value is less than 40. If it is TRUE, run a loop and add 1 to iMark in each loop. Line 8 use increment operator +=
Summary
We have learned:
Console window output via ideone.com
3 basic control structures:
Sequential
Selection [IF … ELSE …]
Loop [WHILE (…) DO …]
Increment operator
Newline character
Next topics:
SWITCH SELECTION
DO (…) WHILE (…) LOOP
FOR LOOP
What is Computer Programming
By: razi.smartcomputing123@gmail.com
What is Computer Programming?
Computer Programming is …
the activities of writing set of instructions that will be executed by a computer machine.
A person who writes computer program is called …
a programmer.
Programming Activities
Programming activities involves:
Analyze user requirement
Design the program
Code the program
Test the program
Operate the program
1.Analyze User Requirement
Finding out:
What is the problem to be solved?
What are the constraints associated with the program?
What is the input/output that the program should get/produce?
Set the program objectives
INPUT
PROCESS
OUTPUT
integer1,
integer2
LET integer3 =sum of integer1 and integer2
integer3
A simple Input-Process-Output box showing the user requirement
2. Design The Program
Narrative Format (Pseudo-Code)
BEGIN
READ integer1, integer2
LET integer3=integer1 + integer2
PRINT integer3
END
Visual Format (Flow Chart)
BEGIN
READ integer1, integer2
LET integer3=integer1 + integer2
PRINT integer3
END
3. Code The Program
#include «iostream»
Using namespace std;
Int main(void){
int integer1,integer2,integer3;
cout««“Enter two integers:”;
cin»»integer1;
cin»»integer2;
integer3=integer1+integer2;
cout««“The sum is:”;
cout««integer3;
system(“PAUSE”);
return 0;
}
Enter two integers:
1
2
The sum is:
3
C++ Source Code Sample
C++ Console Output Sample
4. Test The Program
Test Case is …
a list of input values to be given to the program during runtime together with the expected outcome from the computer.
This helps to …
check whether a program is running according to its specified objectives.
(Test Cases for the program design in the previous slides)
5. Operate The Program
Install to the targeted platform
Training and support
Maintenance
Many types of programming languages
Programming languages…
Language used to construct the program codes
Various types exist…
To support different needs, focus and orientation of programming works
Popular ones are …
C, C++, Java, Visual Basic etc.
Programming Paradigm
The way programmer looks at problem-solving using computers
Procedure-oriented
Program is build from combination of code blocks (procedures)
Object-oriented
Problem-solving involves interaction between entities (objects) that incorporate data and functions.
Commonly Used Paradigm
Procedure-oriented programming
Why?
Simple
Easy to learn and apply
Practical
Available as…
Standalone (C++)
Script (VBA)
Which Language To Start?
It could be …
C++
It provides a starting point before moving to other languages such as Java, PHP etc.
Visual Basic
It provides a starting point for windows-based platform
Or whatever language that you may have found suitable reference and instructor to begin with :-)
Microsoft released a Visual Basic for kids called “Small Basic”
It is so ‘basic’ that a person could easily learn programming
Program Control Structures
Defines how program codes/statements should be executed by computer.
Generally…
Sequential
Execute from top to bottom (default)
Selection
Selectively Execute certain statements
Loop
Repeatedly Execute certain statements
Sequential Control Structure
Statements are executed one after another in a top-down direction.
Selection Control Structure
When the program control reaches a CHOICE point(diamond symbol), it must decide which branch to execute next.
Decision is based on the conditional statement (logic value, i.e TRUE or FALSE) that is placed at CHOICE point.
Loop Control Structure
When a program control reaches a CHOICE point, it must repeatedly execute certain instructions until a loop terminating condition is met.
The terminating condition can be determined either during programming or runtime.
Next?
Let’s start the coding!
Thursday, December 1, 2011
Visit - ideone.com
Ideone is something more than a pastebin; it's an online compiler and debugging tool which allows
to compile and run code online in more than 40 programming languages.
How to use ideone?
Choose a programming language, enter your source code and input data into text boxes. Then check or uncheck run code(whether to execute your program) and private (whether not to list your code in the recent codes page) checkboxes, click the submit button and watch your snippet being executed.
Having problems?
Check the samples to see how to write a properly working code. To find out more, see the help section or the FAQ page.
Visit - FreeMySQL.net
Welcome
We are the leading provider for absolutely FREE MySQL Database Hosting. With our control panel we give you the extra edge to managing your free databases. We provide an even higher level of support and service to you and the rest of our clients. Also being the absolute first free mysql database provider to have a control panel for our clients to manage their free databases, we give you the option to have multiple databases under one account. You are never limited to how many you can create, with a max of five at one time.
Signup
Visit - MySqlForFree.com
Welcome To MySQL For Free!
MySQL is an Open Source Database Server that was recently purchased from Sun Microsystems by Oracle. It is currently one of the most downloaded applications on the web! We at www.MySQLForFree.com are here to help you learn and practice MySQL, and SQL in General, by providing you with a Free MySQL Database up to 25MB.
MySQL For Free is overseen by Joel Hanger - a Certified MySQL Database Administrator with over a decade of experience utilizing and developing among the Unix, Linux, Apache, MySQL and PHP environments.
With this free MySQL database you can learn the basics of database administration, specifically MySQL databases, without a hassle. No strings, no gimmics, just 25MB of Free MySQL Database Space for you to learn, practice, and experiment on. Where you go with the free mysql database is up to you!
Account Features
- 25 MB of Database Space
- Unlimited Databases! - Now Implemented!
- Subdomain with phpMyAdmin
- Slow Query Logs Available
- Error Logs Available
- Usage Reports
- Connections:
- 5 Concurrent Connections
- 2500 Max Queries Per Hour
- 2500 Max Updates Per Hour
- 2500 Max Connections Per Hour
Wednesday, November 23, 2011
Accounting Information System 2
Accounting Information System 2
Based on:
Hall, “Accounting Information System”
Contents
The IS: Accountant’s Perspective
Management Reporting System
Database in a Distributed Environment
REA Approach to Db Modeling
Enterprise Resource Planning
E-Commerce
Managing SDLC
System Development
System Maintenance and Support
IT Controls - IT Governance
IT Controls - Security and Access
IT Controls – System Development Controls
IS Audit
Case Study on Enterprise IS
The IS: Accountant’s Perspective
Management Reporting System
Database in a Distributed Environment
REA Approach to Db Modeling
Enterprise Resource Planning
E-Commerce
Managing SDLC
System Development
System Maintenance and Support
IT Controls - IT Governance
IT Controls - Security and Access
IT Controls – System Development Controls
IS Audit
Sunday, November 20, 2011
cpp-basic program structure to run a hangman game
Wednesday, November 9, 2011
Monday, September 26, 2011
Sunday, September 18, 2011
Software System Implementation
Systems Implementation
- Introduction
- Case Tools
- 4th Generation Tools
- Relational Database Design and Creation
- The Human Computer Interface
- Prototyping
In this chapter we will discuss a number of issues concerned with the implementation of information systems. We will be looking at CASE and 4GL tools and at Relational Database Design, Prototyping and the Human Computer Interface.
Case Tools (Computer Aided Software/Systems Engineering, also known in the literature as CAISE - Computer Aided Information Systems Engineering Tools) have been around for many years and range from basic diagramming packages to systems which take the information systems engineer through the complete process of analysis and design, producing fully documented system models and database creation statements in SQL, some going so far as to produce skeleton code.
At the University of Glamorgan we have the PC/Select package with the SSADM toolkit, over the next week you will complete a PC/Select Open Learning Package, the package covers the basic features of PC/Select, i.e. drawing an LDS, some DFDs and some ELHs and specifying the attributes, primary and foreign keys of the LDS to enable the subsequent creation of a file of SQL Create Table and Create Index Statements.
There are many popular 4th Generation Tools (4GLs) which range from packages like ACCESS and PARADOX, suitable for the development of reasonably simple applications, to multi-featured packages such as ORACLE which is powerful enough to handle enormous distributed mainframe applications.
4GLs typically comprise a Relational Database Management System (RDBMS) surrounded by a number of interfaces, ranging from a simple SQL language interpreter to windows based screen development packages. Many 4GLs also have their own 3rd generation programming languages which can be used to add processing power to the default capabilities of the 4GL. Still other 4GLs allow front ends to be developed using languages such as Visual Basic.
Various 4GLs are available at the University of Glamorgan including PARADOX, ACCESS and ORACLE. PARADOX and ACCESS are typically used for developing stand-alone or end-user applications. ORACLE however is a fully featured 4GE. It has a developers toolkit and a database administrators toolkit.
Developers Tools ORACLE Objects ORACLE Book ORACLE Forms ORACLE Reports ORACLE Graphics SQL*Plus | Administrators Tools Database Manager Database Expander Object Manager Session Manager User Manager Export/Import SQL*Loader |
Using ORACLE Forms it is easy to create rapid prototypes for applications using default processing capabilities. ORACLE also provides, through its own programming language (PL/SQL), the ability to introduce complex functionality. These features should enable your first rapid prototype to evolve into your finished application.
Relational Database Design and Creation
The first step in the implementation process is the creation or modification of the database in a test environment. In simple relational environments this is usually a straightforward task. Consider a simple LDS in which we have a customer entity type owning many orders and a many to many relationship between orders and parts broken down with an order-line entity type. The following attributes have been identified:-
Customer(Customer_Number, Customer_Surname, Customer_Initials, Address_Line1, District, Postal_Town, County, Postcode, Telephone, Credit_Limit, Outstanding_Balance)
Order(Order_Number, Customer_Number*, Order_Date)
Part(Part_Number, Part_Description, Part_Price, Quantity_In_Stock, Reorder_Level, Reorder_Quantity)
Order_Line(Order_Number*, Part_Number*, Quantity)
Key:- Order_Number Primary Key
Customer_Number * Foreign Key
Here are some rules of thumb for use when converting a documented LDS into an ORACLE database (these need to be upgraded to refer to ORACLE 7):-
- Each entity in the LDS becomes a table in the RDBMS.
- Primary key fields should have the not null attribute specified.
- Foreign key fields where the relationship is mandatory at the member end should also have the not null attribute specified.
- Each table should have a unique index specified for the columns (or concatenation of columns) making up the primary key.
- Each foreign key should have a non-unique index associated with it.
This database could be created in the ORACLE RDBMS as follows (these need to be upgraded to refer to ORACLE 7):-
Create table Customers
(Customer_Number Char(6) primary key,
Customer_Surname Char(30),
Customer_Initials Char(6),
Address_Line1 Char(30),
District Char(30),
Postal_Town Char(30),
County Char(30),
Postcode Char(10),
Telephone Char(20),
Credit_Limit Number(8,2),
Outstanding_Balance Number(8,2));
Create table Orders
(Order_Number Char(6) primary key,
Customer_Number Char(6)
foreign key
references CUSTOMERS(Customer_Number),
Order_Date Date);
Create table Parts
(Part_Number Char(6) primary key,
Part_Description Char(30),
Part_Price Number(8,2),
Quantity_In_Stock Number(5),
Reorder_Level Number(5),
Reorder_Quantity Number(5));
Create table Order_Lines
(Order_Number Char(6)
foreign key
references ORDERS(Order_Number),
Part_Number Char(6)
foreign key
references PARTS(Part_Number),
Quantity Number(4)
primary key (Order_Number, Part_Number));
The Human Computer Interface (HCI) can be a key factor in the success of an application. A HCI designer should be aware of what humans are good at and what computers are good at and take this into account. Humans in general are good at controlling, monitoring, decision making and responding to unexpected events. Computers in general are good at storing and recalling data, processing information using pre-specified procedures and presenting options (e.g. a menu or a pick list). Remember your job is to make the task easier not more difficult! Here are some general principles of HCI design:-
- Allocation of functions; Reduce the amount of memorisation required of commands, codes, syntax, and rules by the user. Reduce the amount of mental manipulation of data required.
- Consistency; Be consistent within and across applications in the use of display formats, colours, key-strokes and on-line help, e.g. don’t use
to move from field to field on one screen and on the next screen. - Expectations; Be aware of what other applications the end-user makes use of, identify their expectations and try to conform to them.
- Ease of Learning/Use; Applications need to be easy to learn, easy to use and provide the required functionality. A balancing act may be necessary. The HCI may have to be designed for novices, intermittent users and experts. This can be very difficult, e.g. the novice and intermittent user would probably be pleased to be led by the nose through a multi-level menu system but this approach would slow up the expert user who knows exactly what they want to do and how to do it.
- Designing Display Formats; The placement, organisation, sequence spacing, typography and labelling used in display formats can have a significant effect on the ease with which users can notice, interpret, remember and use the data presented.
- Effective Wording; Text should be legible, brief, clear and consistent. Don’t abbreviate unless the abbreviation is significantly shorter or is more meaningful to the user, e.g. FORTRAN is clearer than Formula Translation Language.
- Colour; Use colour conservatively. Overuse of colour can hinder rather than help causing particular problems to people with colour blindness.
- Graphics; Sometimes a picture is worth a thousand words. It is usually easier to understand a graphical representation, e.g. a pie chart than a tabular representation of data.
- Dialogue Design; Put the user in control, acknowledge their responses and give feedback. Not knowing whether a computer is responding to your actions or doing work on your behalf can be very exasperating.
- Data Entry; Reduce the amount of data to be input by providing defaults and enabling the user to select data from a list displayed on the screen.
- Help and Error Messages; use context sensitive help and clear helpful error messages.
- Consistency; Information such as screen identifier, screen title, page number, date, error messages and system messages should always appear in the same place. Dates should be consistent throughout the application, e.g. DD-MM-YYYY.
One of the most useful techniques for getting the HCI right is prototyping. The word prototype is defined as ‘an original thing in relation to a copy, imitation, representation, later specimen improved form etc.; a trail model, a preliminary version’ (Concise Oxford). In information systems engineering prototypes are used to both validate and identify user requirements to verify design and to provide a base line for the eventual development of the system. The idea is that a working model is much easier to understand, from the end-users point of view, than a set of diagrams and supporting documentation.
Some people have viewed prototyping as an alternative to analysis and design, this is not the case, the prototyping life cycle if carried out without conducting thorough analysis and design, is likely to be endless.
The prototyping lifecycle proceeds through six main phases:-
- Scope; In this phase the boundaries of the system in question are identified.
- Requirements Analysis; During this phase the requirements of the system are identified (this phase is roughly equivalent to the SSADM Requirements Analysis and Requirements Specification modules).
- Design; This covers the Logical Design of the system in question (this phase is roughly equivalent to the SSADM Logical System Specification stage)
- Prototype; During this phase a working model of the system is created by the developers using appropriate 4th generation tools (prototyping for information systems cannot really work effectively unless these tools are available).
- Demonstrate; During this phase the prototype is presented to the end-user for comment. The demonstration can result in, new or changed requirements, which would necessitate backtracking to the requirements analysis phase, holes being discovered in the analysis and design which would necessitate backtracking to the design phase, and purely cosmetic changes concerning the HCI, which would necessitate backtracking to the prototype phase.
- Deliver; A number of approaches can be taken to delivery, e.g. the big bang approach in which the whole application is delivered, or the incremental approach whereby parts of the application are delivered as they roll off the prototyping production line.
See slide 10
The literature commonly identifies 4 kinds of prototype:-
- Cosmetic Prototypes; These are non-functional mock-ups of systems or parts of systems which have the appearance that the designer expects the final system to have.
- Research Prototypes; Research prototyping occurs when there are specific and firm non-functional (i.e. regarding performance or security) requirements which the designers wish to prove.
- Throwaway Prototypes; These are prototypes which are built solely with the aim of validating requirements, they are put through verification and then discarded.
- Functional/Evolutionary Prototypes; Functional prototyping refers is an approach involving designing the system, producing a first working prototype, verifying the systems ability to support user requirements and refining this prototype into the finished system. Functional Prototyping depends to a large extent on whether the tools used in the development environment, e.g. a PC can be ported to the implementation environment, e.g. an ICL mainframe.
Prototyping ‘v’ SSADM’
As may be seen there are some inconsistencies in the approaches adopted under a prototyping scheme and the SSADM scheme. When using prototyping analysis and design are carried out in a less rigorous and comprehensive manner than when using SSADM. When using SSADM the assumption appears to be that the analyst will get it right first time, prototyping has a minor role in SSADM.
There is no right approach which suits all projects. It may be better to use a functional prototyping approach for relatively simple end-user applications, but a complex fundamental business system like payroll or customer billing probably needs the rigour of SSADM. Alternatively a hybrid approach could be adopted, integrating a prototyping approach to implementation, with SSADM.
Tutorial Sheet Prototyping
Objectives
To evaluate the strengths and weaknesses of the prototyping method.
Question 1
Why would an end user find it easier to criticise a prototype than a DFD?
Question 2
In what kinds of situations would you adopt the different prototyping methods and what approach are you adopting in your project.?
Question 3
Why is prototyping ineffective when using 3rd generation languages such as COBOL?
Software Quality Assurance
Quality Assurance
- Quality Terminology
- Quality Assurance Frameworks
- The Costs of Quality
- Walkthroughs, Inspections & Reviews
- Quality = Conformance to Requirements; The definition of quality in every-day terms involves some measure of excellence (‘degree of excellence’ - Concise Oxford). In the development of information systems quality has come to mean conformance to requirement, not just in terms of functionality but also with regard to ease of use, performance and value for money. slide 2
- Quality Control; Quality Control is the formal assessment of deliverables to ensure that they conform to requirements. A typical example of a quality control activty is a structured walkthrough slide 4
- Quality Assurance; Quality assurance is concerned with the development of guiding frameworks within which individual quality control mechanisms take place. slide 5
- Quality Management; Quality management is concerned with co-ordinating the efforts of individuals, the tools and methods used and the quality assurance frameworks and quality control mechanisms, towards the common goal of improving quality. It is also concerned with the development of a culture in which each individual takes responsibility for the quality of their own work has access to the appropriate tools and techniques for the job and has the management support necessary to enable them to do so. slide 6
A quality assurance framework involves the following processes or activities:-
- Identification of Requirements; This process involves identifying and documenting the requirements of the end-users. This has to be the first phase in the development of quality products (if the requirements are unknown or woolly how do we know when we have conformed to them?).
- Produce Deliverables; This is where the work gets done, e.g. producing a Logical Data Structure, Data Flow Diagram or working program/module.
- Quality Control; In this process deliverables are checked to ensure that they conform to identified requirements, any errors or areas of non-conformance are recorded. This list of errors feeds back into the produce deliverables process where the errors are corrected.
- Improve Standards; During this process the errors identified in quality control are analysed and steps taken to prevent these errors from recurring, e.g. by improving standards or by providing training.slide 7
A corporate data architecture as described in chapter 5 would form part of the quality assurance framework for analysis and design since there is a requirement for the LDS to conform to the Corporate Data Architecture.
The cost of quality has been defined by Philip B. Crosby in his book ‘Quality is Free’ as the cost of not getting things right first time.
- Prevention Costs; These are costs incurred in preventing mistakes from happening such as, the implementation of standards, staff training and the costs involved in setting up quality management programs.
- Appraisal Costs; These are the costs incurred in looking for mistakes before a product is released including, program/system/acceptance testing, walkthroughs, inspections and project reviews.
- Failure Costs; These are the costs incurred because a product doesn’t conform to requirements such as, re-work, overtime, loss of business and maintenance.
The systems development lifecycle has occasionally been broken down into the break-down phase consisting of identification of requirements, systems analysis and specification, logical design and physical design, and a build-up phase consisting of program testing system testing acceptance testing and operation. slide 10
It is generally accepted that the cost of error correction increases sharply during the build-up phase and again when errors are detected in live operational running (B. Boehm ‘Software Engineering - IEEE Transactions on Computing). Recently a large organisation as part of their quality management program analysed how the IT budget was being spent in terms of prevention, appraisal, failure and productive costs the following results were found:-
Cost | Percentage of IT Budget |
Prevention | 2% |
Appraisal | 40% |
Failure | 35% |
Productive Work | 23% |
The organisation also set itself some targets for improvement.
Cost | Percentage of IT Budget |
Prevention | 10% |
Appraisal | 40% |
Failure | 10% |
Productive Work | 40% |
The organisation expected that a small increase in prevention costs (up to 10%) would result in a dramatic drop in the costs of failure (down from 35% to 10%) thus resulting in a substantial rise in productive work (up to 40%).
The aim of the organisations quality management program was to significantly reduce the costs of failure by;
- using improved appraisal mechanisms to identify and correct errors as early as possible (i.e. when it is cheapest to do so) and
- by taking action to prevent the recurrence of errors.
Error detection, correction and recurrence prevention is the essence of quality assurance and the resulting increase in productive work is the thinking behind Philip Crosby’s belief that quality is free
Walkthroughs, Inspections and Reviews
These can be informal, e.g. asking a colleagues opinion, semi-formal, e.g. a brainstorming session, or Formal, e.g. a formal inspection of a LDS.
The purpose of a formal inspection is the identification of errors and/or areas of non-conformity. The purpose is not to correct the errors this, in a quality culture, has to be the responsibility of the original producer of the deliverables being inspected.
The following roles are found in most formal inspections:-
- Moderator; Responsible for arranging the inspection, distributing the materials and acting as chairperson during the inspection.
- Producer; Responsible for producing the deliverables and delivering them in good time to the moderator.
- Standards Bearer; Responsible for ensuring that any relevant standards, e.g. SSADM Version 4 are adhered to.
- Scribe; Responsible for documenting any areas of non-conformance.
- Reviewer; Everyone has a responsibility for the identification of errors/non-conformity but a reviewer has no other specific responsibilities.
It is important that consensus is reached regarding the outcome of the inspection. There are only three possible outcomes; Pass (as is), Pass (minor modifications required) or Fail (further inspection required). The other important thing for everyone involved but particularly for the producer to remember is that what is being criticised is the work not the person who produced the work. An example of a typical quality control form follows:
Structured Walkthroughs are described in great depth in Ed Yourdon’s book ‘Structured Walkthroughs’.
Software Development Methodologies
Research in Methodologies
- Aims and Objectives
- Information Systems Failure
- Stable Corporate Data Structures
- Corporate Information Management Strategy
- Dynamic Business Activity
- Flexible Applications Development
- Influencing Factors
- Comparison and Critique of SSADM and DSDM
- SSADM4+
- Required Features
- Methodology Development
- Enabling Rapid Application DevelopmentAD
- Enabling End-User Systems Development
The aim of the research program is to develop a holistic methodology for information systems engineering based on a Corporate Information Management Strategy (CIMS).The intention is to realise the methodology by integrating a wide variety of contemporary approaches from the fields of business process re-engineering, strategic information systems planning, project management, socio-behavioural development, structured methodologies, the object oriented paradigm, rapid application development and end-user systems development.
Objectives
- To define the class of information systems for which the methodology is applicable and explain why such a methodology is required based on an analysis of information systems failure.
- To demonstrate that the majority of corporate data structures are fundamentally more stable and common across business areas than the majority of business processes and thus form a strong foundation for strategic information systems planning.
- To demonstrate the importance of adopting, a strategic, rigorous approach to the development of corporate data structures.
- To demonstrate the dynamism of the activities which organisations carry out in order to achieve their objectives.
- To demonstrate the importance of adopting a flexible, evolutionary approach to the development of applications which support and enable business processes.
- To review the following fields and identify the implications for the development of the methodology:-
- Business Process Re-Engineering,
- Socio-Behavioural Development,
- Structured Methodologies,
- Object Orientation,
- Rapid Application Development,
- End-User Systems Development.
- To document the features required of the methodology.
- To develop and illustrate the methodology.
- To describe how the methodology enables rapid application development.
- To describe how the methodology enables End-User Systems Development.
The objective of this section is to define the class of information systems for which the methodology is applicable and explain why such a methodology is required based on an analysis of information systems failure. Much of the work in this area will be based on the material in Sauer’s book entitled Information Systems Failure: A Case Study Approach (Sauer, 1995).
Stable Corporate Data Structures
Corporate Information Management Strategy
The objective of this section is to demonstrate the dynamism of the activities which organisations carry out in order to achieve their objectives.
Flexible Applications Development
The objective of this section is to demonstrate the importance of adopting a flexible, evolutionary approach to the development of applications which support and enable business activities.
Comparison and Critique of SSADM v4 and DSDM
The objective of this section is to document the features required of the methodology.
The framework should have the following aims :-
- Application for a wide variety of information systems;
- Facilitation of consistent and long term RAD (through data and software re-use)
- Effective development, facilitation and management of End-User Computing (EUC).
The objective of this section is to develop and illustrate the methodology.
Overview
Figure <> provides an overview of the proposed methodology. The subsequent sections provide more detailed descriptions of the phases of the methodology.
|
Figure <> Information Systems Engineering Methodology |
It should be noted that the remits of phases 2, 4 and 6 have to cut across any artificial project boundaries.
Corporate Data in Action
In this section the methodology is illustrated by using an example based on a hypothetical University environment. A common shortcoming of many methodologies is that they assume a greenfield site. The illustration will show how the methodology can be used in a more typical site, i.e. one in which there exists a confusing and sometimes conflicting variety of corporate, departmental and personal systems running on a variety of hardware and software platforms.
Scenario
Lecturers in a college are responsible for teaching modules and assessing the students taking the modules through a mixture of coursework and examination. The college has a central Student Administration System (SAS) which records data regarding which students are taking which modules.
The SAS holds data on the contributions that coursework and examination make to the final grade for the module but no detail concerning the number of courseworks and the format and structure of the examination.
At the start of each semester lecturers receive a printed list of students taking their modules from the SAS. The lecturer wants a system which enables the marks students achieve in courseworks and examinations to be recorded and presented back to the SAS. Faced with this problem in previous years lecturers have been left to their own devices and many have resorted to building their own spreadsheets and re-keying the names of the students on the pre-printed list. This uncontrolled approach has lead to
- duplication of data, the same student is recorded by different lecturers and by the SAS,
- duplication of effort, each lecturer builds their own spreadsheet and
- inconsistency of data, e.g. T.D. Hutchings is recorded up to six times (once by the SAS and up to five times for the modules they are taking), ‘Mr. T.D. Hutchings’, ‘Hutchings, Timothy D’, ‘Tim Hutchings’, ‘Timothy David Hutchinson’ etc. (which is correct?).
The implications of this approach on the correct recording of students grades are obvious. Adopting the CDMS via the proposed methodlogy could address some of these problems.
Phase 1: BusinessActivity Analysis
Aims & Objectives:
- To identify how the current business processes are carried out.
- To identify the data structures required to support the current business processes
Inputs
<>
Structure
The business process analysis phase concentrates on identifying and documenting low level business activities and consists of two overlapping tasks :-
- Detailed Data Flow Analaysis using low level Data Flow Diagrams;
- Detailed Data Structure Analysis using Relational Data Analysis (Normalisation)
The relationship between the tasks is shown in figure <>. The approach accepts the fact that conducting detailed data structure analysis may dictate further data flow analysis and therefore that this phase is iterative in nature.
|
figure <> Phase 1 Busines Process Analysis |
Techniques
<>
Deliverables
The deliverable from this process is a series of detailed process descriptions each consisting of a low level DFD and a set of normalised tables.
Practice
The first task for the systems analyst is to identify and document the processes which lecturers carry out in terms of assessing students. The following business processes are identified :-
The ‘Students Taking Module’ print out is received from the administrative stafff of the department.
During the first few weeks of the semesters the lecturer maintains the list by taking registers, crossing off drop outs and including late starters.
The corrected list is returned to administrative staff in order to update the SAS.
A spreadsheet is created and the names of the students are keyed in. A column or columns are included for each coursework and the examination.
Periodically the courseworks set are marked and the results keyed into the appropriate columns.
The examination is marked and the results entered.
Formulae are created which calculate the overall coursework and examination percentages for each student.
The appropriate columns from the spreadsheet are extracted and passed on to administrative staff for input to the SAS.
A detailed data flow diagram to represent these business processes is shown in figure <>
figure <> 1st Draft Data Flow Diagram |
The key data structure which supports these processes is obviously the lecturers spreadsheet, an example of which is shown in figure <>.
figure <> Example Spreadsheet |
Analysing the data structure using a combination of normalisation, top-down entity-relationship modelling, common sense and business awareness reveals the following model:
|
figure <> External Schema for Student Assessment |
Phase 2: Business Activity Re-Engineering
Aims & Objectives
- To identify improved ways of conducting business activities. NB It is relatively easy to identify and remove duplication and inconsistency, however substantial improvements rely on creative input from the people involved.
- To ensure that the newly engineered business processes are consistent with the results of any overarching business process re-engineering initiatives and with other processes in the value chain of the organisation.
- To describe the external schema requirements of the re-engineered business processes.
Inputs
<>
Structure
This phase begins with the relatively straightforward task of rationalising the process descriptions produced in phase 1 to remove duplication and inconsistency. The result of this rationalisation is a single set of normalised tables and a hierarchic set of DFDs.
Then begins the difficult task of re-engineering the business process. In this area there are no magic wands there is no substitute for detailed business knowledge and experience. The systems analyst should adopt a facilitatory role. It should be clear that this kind of task cannot be carried out within the boundaries of a particular project.
The final task in this phase involves carrying out any changes to the DFD’s and the normalised tables, necessitated by the re-engineering process.
| |
NB:It should be noted that information collected in tasks 3 and 4 may necessitate revisiting phase 1. | figure <> Phase 2 Business Activity Re-engineering
|
Techniques
<>
Deliverables
The deliverables of this phase are (a) a set of hierarchic DFD’s with supporting documentation consisting of text, decision tables, structure charts, algorithms etc. as considered appropriate by the analyst and (b) a set of normalised tables with supporting documentation. The set of normalised tables forms the beginning of an external schema definition for the application.
Practice
During this phase the Data Flow Diagrams and External Schema are rationalised to remove duplication and inconsistency. The next step is to consider ways in which the business process could be re-engineered. Finally the Data Flow Diagrams and External Schema are redrafted to support the re-engineered activity.
Phase 3: Functional Model Iteration
Aims & Objectives
- To iteratively build a prototype which embodies the functional requirements of the system.
Inputs
Analysis & Design Reports from phases 1 and 2.
Technical Standards (e.g. hardware / software platforms and HCI standards).
Structure
The structure of this phase is again iterative, allowing for the creation and refinement of the prototype based on feedback. Ths structure is shown in figure <>.
NB This phase is very close to the identically named phase as part of standard DSDM.
|
figure <> Phase 3 Functional Prototyping |
Techniques
<>
Deliverables
The result of the prototyping process should be agreement on the functional requirements of the application and a revised external schema definition.
Practice
During this phase the analyst adopts the iterative prototyping approach in order to prove the functional requirements of the system. Ideally a CASE tool would be used to support the analysis process and be capable of generating a first cut prototype with little or no extra work from the analyst. Furthermore the use of a scaleable implementation platform within a common technical architecture should enable the functional prototype to be used as a baseline for the forthcoming design and build prototype.
Phase 4: Corporate Data Design
Aims & Objectives
- To evaluate how the corporate database definition (the conceptual schema) affects and is affected by the new external schema.
- To design and implement the required changes to the conceptual schema.
- To design and implement the required changes to the internal schema and to create the new external schema in a test environment.
Inputs
<>
Structure
The Corporate Data Design phase consists of three tasks as illustrated in figure <>
|
During tasks 1 and 2 the required external schema definition (possibly represented as a set of normalised tables or an Entity-Relationship Model) is integrated with the conceptual schema. At the logical level i.e. in meta-data terms.
During task 3 the identified changes are implemented into a test environment
|
figure <> Phase 4 Corporate Data Design
|
During this phase the External Schema is integrated with the Conceptual Schema. If there is no conceptual schema, i.e. this is the first project to adopt the CDMS, then the External Schema needs to be re-examined in the light of corporate requirements and appropriate parts of the External Schema used to form the beginnings of the conceptual model. (In this example the entities Student, Module and Student taking module would become the beginnings of the corporate database.)
The next task is to implement the changes to the internal schema in a test environment. This is the stage at which many attempts to adopt a CDMS fail due to a lack of commitment and understanding. The problem is that student data, currently held in the central SAS, has to be unlocked. Student data has to become centrally managed in a new internal schema independent of the SAS or any other system. The SAS itself has to be amended in order to work with a view of the new internal schema rather than its own student file. The seemingly wasted effort of amending the SAS is very difficult to justify in the short term, however only by bearing this cost can long term RAD be consistently achieved and EUC effectively enabled.
The Corporate Data Design phase by its very nature cuts across system boundaries and only at this stage can the knock on effects of systems development be identified.
The External Schema is realised by creating views of the internal schema and combining these views with local tables.
Techniques
<>
Corporate Object Modelling
At this stage the techniques of Entity/Event modelling may be used in order to provide a start point for the production of ‘method’ specifications. Some explanation is required at this point. An object consists of data and methods. Methods are essentially modules of code which can be kicked into action in order to create, update, query or delete the object depending on which messages are received from other objects.
This may seem far removed from the entity/event modelling technique found in the SSADM methodology. However, on looking at the technique in detail, Entity Life History Diagrams describe not simply the business events which cause entities to be created, updated and deleted but furthermore the order in which these events should occur. Therefore the combined usage of Entity-Relationship Modelling and Entity Life Histories provides a good starting point for the definitions of classes and methods. Effect Correspondence Diagrams (ELH diagrams show how a particular entity type is affected by the system’s events, Effect Correspondence Diagrams show how a particular event affects the system’s entities) may prove useful for identifying messages.
Deliverables
<>
Phase 5: Design and Build Iteration
Aims & Objectives
To iteratively build a prototype which embodies the functional and non-functional requirements of the system in a test environment which is, so far as possible, identical to the live or production environment.
Inputs
<>
Structure
This phase largely adopts the structure of the identically named phase of the DSDM methodology. However it should be noted that during this phase it may be necessary to ‘software engineer’ certain key methods, algorithms and modules / programs. Using software engineering techniques such program structure diagrams and formal methods as deemed appropriate.
It should be noted that this phase may indicate new or changed corporate data requirements and necessitate returning to the previous phase.
During this phase the local External Schema used by the Functional Prototype is replaced by the new External Schema. The prototype is then developed iteratively to prove both functional and non-functional requirements.
Techniques
<>
Deliverables
<>
Practice
<>
Phase 6: Production Implementation Control
Inadequate systems implementation can probably be blamed for a number of systems failures. Implementation could be inadequate for many reasons including (a) the failure to distinguish between final test versions and production or live systems, (b) inadequate training and (c) failure to co-ordinate production implementation when different systems are developed in parallel.
Aims & Objectives
- To identify, plan and schedule appropriate ‘delivery units’;
- To conduct the production implementation of delivery units.
Inputs
<>
Structure
A simple technique is to invoke a regular production implementation slot, prevent implementations at other times and adopt quality assurance procedures for implementation plans. This should enable delivery units and training to be scheduled accurately and avoid uncontrolled implementation.
Techniques
<>
Deliverables
<>
Practice
<>
Enabling Rapid Application Development
The objective of this section is to describe how the methodology enables rapid application development.
Enabling End-User Systems Development
The objective of this section is to describe how the methodology enables End-User Systems Development.