Pertemuan 12 Developing Application Matakuliah : D0524 / Algoritma dan Pemrograman Komputer

advertisement
Matakuliah
Tahun
Versi
: D0524 / Algoritma dan Pemrograman Komputer
: 2005
:
Pertemuan 12
Developing Application
1
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :
• Menerapkan penggunaan database dalam
aplikasi
2
Outline Material
3
Stages on Application
Development
Start
Problem
Identification
Model
Development
Algorithm
Design
Programming /
Coding
Testing and
Analysis
Documentation
End
4
Problem Identification
• Defining the scope of problem
• Ensure that the problem is clearly defined
and understood
• Completing problem identification is half
way in solving the problem
5
Model Development
• A model (or conceptual model) is a theoretical construct
that represents physical, biological or social processes,
with a set of variables and a set of logical and
quantitative relationships between them.
• Models in this sense are constructed to enable
reasoning within an idealized logical framework about
these processes and are an important component of
scientific theories.
• Idealized here means that the model may make explicit
assumptions that are known to be false in some detail,
but by their simplification of the model allow the
production of acceptably accurate solutions
• A mathematic model is commonly used in model
development
6
Algorithm Design
• Designing steps to solve the problem based on
model defined on model development stage
• The algorithm must clearly illustrate whole steps
on problem solving
7
Programming / Coding
• Also referred to as implementing the
solution
• Translate the solution into a usable
application
8
Testing and Analysis
• Test the completed application to ensure
that it provides a solution to the problem,
and correct any errors that are found
9
Documentation
• For every problem solution, five document
types should be provided for complete
documentation:
– Initial application description
– Description of modification and changes
– Well-commented code listing
– Sample test runs
– User’s manual
10
Examples
• Worker Wages
– The worker wages for one week (5 days work)
consist of two component :
• Daily wage (D Rupiah/day) if he/she works for 8
hours a day
• Overtime wage (O Rupiah/hour) if he/she works
more than 8 hours a day
– Calculate a worker wage for a week where
work hours is given
11
Example
•
Worker wage Algorithm
Total_upah  0, Total_pendapatan  0
Read work hours of day 1
Upah_hari_ini = D + (jam kerja – 8) x O
Total_pendapatan  Total_pendapatan +
Upah_hari_ini
5. Repeat steps 2 to 4 until day 5
1.
2.
3.
4.
12
Example
• Assume
– Daily wage D = Rp. 50.000 / day
– Overtime wage O = Rp. 10.000 / hour
– Work hours Day 1 to 5 : 10, 8, 12, 8, 8 hours
–
–
–
–
–
Day 1 wage = 50.000 + (10 – 8) x 10.000
Day 1 wage = 50.000
Day 1 wage = 50.000 + (12 – 8) x 10.000
Day 1 wage = 50.000
Day 1 wage = 50.000
– Total wage = Rp. 310.000,13
Example
• In this example, the algorithm has been develop,
but the problem is not clearly stated, because
there are some things to consider:
– How to calculate if the worker work less than 8 hours
a day?
– Is there any maximum overtime hours?
• The answers of above questions may change
the algoritm to calculate the worker’s wage
14
Download