Title: BU115: Computer Concepts Lecture Slides
1BU115 Computer ConceptsLecture Slides
Programming Languages
2Software Review
- SYSTEM
- What is the purpose of System software?
- What are the major components?
- What is multitasking?
- APPLICATION
- What is the purpose of Application software?
- What are the major types? Examples?
- What defines software compatibility?
3System Software Review
4Software Programming Languages
5Software Programming Languages
Week 3 Review
Learning Objectives
1. Explain the programming process 2. Identify
the major programming tools 3. Describe the
generations of programming languages 4. Compare
the language translators 5. Identify the major
programming languages
6Software Development
What is a computer program?
A series of instructions (algorithm) that direct
the computer in performing a specific task.
7Software Development
The Programming Process
A scientific methodology for designing and
developing programs.
8Software Development
Group Problem Solving
A Programming Project
- Your Sales Manager for a small computer company
has told you that you need a program to handle
sales - What are the first steps in doing this project?
9Software Development
Program Development
1. Define the problem 2. Solve the problem 3.
Write your program 4. Test your program 5.
Implement your program (6. Maintain your
program)
10Software Development
The Programming Process
1. Problem Definition 2. Program Design 3.
Program Development (Coding) 4. Program
Testing 5. Program Implementation
(Documentation) 6. Program Maintenance
11Software Development
Problem Definition
12Software Development
1. Clarify Objectives Users
2. Specify Desired Output
Six Steps of the Problem Definition Stage
3. Specify Required Input
4. Specify Required Processing
5. Determine Feasibility
6. Document Analysis
13Software Development
Program Design
Problem Definition
14Software Development
Group Problem Solving
A Programming Project
- Your Sales Manager decides on a program to
compute total sales for a series of items - Develop in English the algorithm to compute the
Total sales.
15Software Development
A Programming Project..
- What do you need to know?
- What output? (item, sales,)
- What input?
- (item, quantity and unit price)
- What processing?
- E.g. sales qty price
- discount 10 for orders of over 50.
16Software Development
A Programming Project..
- Sample Input
- Item Unit price Quantity
- CPU 375 10
- Drives 120 20
- RAM 256MB 80 55
- Power Supply 20 5
- Motherboard 425 15
- .
17Software Development
Program Design Tools
- Program Flowcharts
- Structure Charts
- Pseudocode
18Software Development
Program Flowchart
Terminal
Decision
Direction
Connector
Processing
Pre-Defined Process
Input/Output
Off-Page Connector
19Software Development
Sales Problem
Initialize
Calc Gross Sales
Calc Net Sales
Output Info
Input Data
Calc Discount
Accum. Totals
20- Sales Problem
- TotalSales 0
- Input Item, Price, Qty
- 3. GrossSales Price Qty
- 4. If Qty gt 50
- Then Disc GrossSales .1
- Else Disc 0
- 5. NetSales GrossSales - Disc
- TotalSales TotalSales NetSales
- Output Item, NetSales
- Output TotalSales
-
21Break Time
10 Minutes
22Software Development
23Software Development
Program Coding
Program Design
Problem Definition
24Software Development
- Language selection
- Convert logic/pseudocode to program code
- Apply rules of language
- (syntax or grammar)
Program Coding
25Software Development
Program Testing
Program Coding
Program Design
Problem Definition
26Software Development
TESTING
Desk Checking
Debug
Real-World Data
27Software Development
TESTING
- Commercial Software
- Alpha Testing
- Beta Testing
- Gold
28Software Development
Document Install
Program Testing
Program Coding
Program Design
Problem Definition
29Software Development
DOCUMENTATION
User
Operator
Programmer
30Software Development
Document Install
- Implement programs
- Maintenance
- Fix errors
- Update
31Programming Languages
1st Generation
2nd Generation
Machine Language
3rd Generation
Assembly Language
4th Generation
High-Level Language
5th Generation
Very High-Level Language
Natural Language
32Decimal/Hex/Binary Numbers
33Machine Language
34Assembly Language
35High-Level Language
36High-Level Language
37Programming LanguagesComparison of Generations
1st Generation
5th Generation
- Binary, cryptic
- Procedural
- Faster
- More flexible
- More error-prone
- Difficult to learn/use
- English-like
- Non-procedural
- Slower
- Less flexible
- Less error-prone
- Easier to learn/use
38Advanced Programming
- Object-Oriented Programming (OOP)
- Visual Programming
39Programming Languages
Traditional Programming
Input
Step 1
Step 2
Step 3
Output
Step 4
40Programming Languages
Object-Oriented Programming
Data
- Library of objects
- Select objects to build application
Instructions
OBJECT
41Advanced Programming
- Object-Oriented Programming (OOP)
- Combines instructions and data into
self-contained units (objects) - Concepts
- Encapsulation object contains data instr
- Inheritance - inherits properties of class
- Polymorphism - many forms of same object
42Advanced Programming
- Visual Programming
- Extension of OOP
- Interface is created graphically (visually)
using icons and mouse - Faster development
43Programming Languages
- Traditional Languages
- Fortran
- COBOL
- PL/1
- BASIC
- C, C
- RPG
-
44Programming Languages
- Web Languages
- HTML (HyperText Markup Language)
- Text with embedded commands - for page links,
graphics, etc. - Used for Web pages
- Java language (like C)
- To create applications (applets) for web pages
- Very portable and scalable
-
45Review Programming Languages
Questions Answers
46Review Programming Languages
- Questions Answers
- Define
- a) Pseudocode
- An English-like representation of the logic of
a program. It is used as a basis for coding
programs. - b) Structure Chart
- A graphic representation of the solution of a
problem. It shows the problem sub-components in
a hierarchical form.
47Review Programming Languages Questions Answers
2. Explain the purpose of language translators
and the difference between a compiler and an
interpreter. Language translators, convert the
program source code into machine language. The
compiler translates the entire program before
starting to execute the instructions. The
interpreter translates and executes each
instruction one at a time.
48Review Programming Languages Questions Answers
3. What is the difference between a procedural
language and an OOP language? Both are used to
develop software applications. With a procedural
language, you specify the algorithm (procedure)
to be applied to the input data to generate the
outcome In OOP, the instructions and data are
combined in a set of self-contained units
(objects), which are selected and used to build
the application.
49Software Review
- Software is the set of instructions to direct the
computer (also documentation) - Software falls into two main categories
- Systems - manage the system
- Application - applying the computer
- There is a methodology for developing software.
Next Class HTML Tutorial Lab