COMP 103 L1-Prog-CSIT - Stud
COMP 103 L1-Prog-CSIT - Stud
PROGRAMMING
2
Information Systems
• System
– A collection of pieces working together to achieve
a common goal
• An information system includes
– Data
– People
– Procedures
– Hardware/Software
• System development life cycle (SDLC)
– An organized process (or set of steps) used to develop
systems in an orderly fashion
3
System Development Life Cycle
Problem/
Opportunity
Identification
Analysis
Design
Development &
Documentation Testing
&
Installation Maintenance
& Evaluation
4
Problem/Opportunity Identification
• The existing system is evaluated:
– Problems are defined
– New proposals are reviewed
– Decisions are made to proceed with the projects
– Document the process and relevant
problems/opportunities defined
5
Analysis
• A program specification is developed (goals
and objectives of the project)
• Feasibility assessment is performed
• User requirements are defined
• Analysts recommend a plan of action
• The plan is documented
Step 1
Describing the Problem
Step 2
Making a Plan
Step 3
Coding
Step 4
Debugging
Step 5
Finishing the Project
12
Step 1 : Describing the Problem
• The problem statement is:
– The starting point of programming
– A description of tasks the program is to accomplish
– How the program will execute the tasks
– Created through interaction between the programmer and
the user
• The program statement includes error handling and a
testing plan
• Algorithm development:
– A set of specific, sequential steps Check wallet
for $
that describe what the computer
Do I have >
program must do Yes $80 No
– Complex algorithms include Head off Yes Do I have my
decision points: to cafe credit card?
• Binary (yes/no) No
Go get gas Yes
• Loop (repeating actions) Go to the ATM
for cash
– Visual tools used to track Buy
algorithm and decision points: textbook
Did I get $80
from the ATM?
Go to No
accounting
© 2007 Prentice-Hall, Inc. lecture
15
Flowchart and Pseudocode
Flowchart
Pseudocode
Bold terms show actions that are common in
programming, such as reading data, making
decisions, printing, and so on.
17
Object-Oriented Analysis
• Object-oriented analysis
• Classes (categories of
inputs) are identified
• Classes are defined by
information (data) and
actions (methods or
behaviors)
• Objects are defined by their
class, data and behavior
• Interaction between classes
is determined
• Existing classes can be used
for other projects
18
Step 3: Coding
• Coding is translating an algorithm into a
programming language
• Generations of programming languages
19
Compilation
• Compilation is the process of converting code
into machine language
• Compiler reads the source code and translates
it into machine language
• After compilation, programmers have an
executable program
21
Step 4: Debugging
• Running a program to find errors is known as
debugging
• Sample inputs are used to determine runtime
(logic) errors
• Debugger: Tool that helps programmers locate
runtime errors
22
Step 5: Finishing the Project
• Users test the program (internal testing)
• Beta version released:
– Information collected about errors before final
revision
• Software updates (service packs):
– Problems found after commercial release
• Documentation created:
– User manuals
– User training
JavaScript
Visual VBScript
Basic
C / C++ HTML
Java
24
Visual Basic
• Used to build Windows Sample Visual Basic
applications
• Object-oriented
language
• VB.NET is the current
version
25
C and C++
• C Sample C
– Developed for system
programmers
– Combines high and low
level programming
features
– Modern operating
systems written in C Sample C++
• C++
– Uses the same features as
C
– Includes object-oriented
design
.
26
Java
• Object-oriented features
• Large set of existing classes
• Architecture neutral
• Java applets: Small Java-based programs
27
Web Applications
• HTML/XHTML
– Hypertext Markup Language/Extensible Hypertext
Markup Language
– Not a true programming language
– Uses special symbols (tags) to control how Web
pages are viewed
• Extensible Markup Language (XML)
– Enables computers to efficiently transfer
information between Web sites
28
Web Applications
• JavaScript
– Used to make Web pages more visually appealing
and interactive
• VBScript
– A subset of Visual Basic
– Used to add interactivity to Web pages
29
Web Applications
• Active Server Pages (ASP) and Java Server
Pages (JSP)
– Adds interactivity capabilities to Web pages
– Translates user information into a request for
more information from a company’s computer
• Flash
– Enables elaborate animations to be created for
Web pages
30