CSC 150 UNGRADED QUIZ - Concordia University Wisconsin

Download Report

Transcript CSC 150 UNGRADED QUIZ - Concordia University Wisconsin

APPLICATION
PACKAGES I
(1) Review of S/W.
(2) Definition of application package.
(3) How are programs developed?
(4) Goals of application packages.
(5) The power of S/W.
1. Review of S/W.
 A. S/W = instructions that tell the H/W how
to process data into information.
 B. Recall the three layers of S/W around
the H/W.
2. Definition of application
packages.
 Definition.
 An application package =

a pre-written set of instructions
packaged for use in a specific
computer system (S/W and H/W
configuration, type of user).

e.g. for Macs, for IBMs, for UNIX systems, for
general user / expert professional.
3. How are programs
developed?
 Application packages go through what is
called the Program Life Cycle.
 There are three main phases:
 (A) Design,
 (B) Implementation,
 (C) Maintenance.
3A. The Design phase.
 In this phase, we create the solution.
 Step 1. Receive the specification. E.g.
allow the user to graph data as line, bar or
pie charts.
 Step 2. Analyze the problem into….



Input,
Processing,
Output.
3A. Design phase continued.
 Step 3. Create our solution, known as
 an ALGORITHM. This is our blueprint
for the program. [Like an architect’s
blueprint, or furniture assembly
instructions or a recipe.]
 Algorithms can be represented in 3 main
ways: (1) pseudocode, (2) flowcharts,
 (3) module charts.
3A. Design phase continued.




Step 4. Test the algorithm.
How?
By playing computer.
Why? Why not wait until we have created
the program?
 Architect analogy.
3B. Implementation phase.
 Step 1 Code the program =
 translate the algorithm into the statements
of a programming language.
 Why can’t we use English?
 What is a programming language? E.g.s?
 A precise, unambiguous, formal language
restricted to operations a computer can
perform.
3B. Implementation continued.




Step 2 Compile the program.
What is compiling?
Translating the program source code into
machine code (all data and instructions in
binary).
 Step 3. Test and Debug the program.
3C. Maintenance Phase.
 In this phase, there are no steps, but a
variety of activities:
 use the program, fix bugs, upgrade it etc.
 In fact, upgrades are always disguised bugfixes plus additional features.
 Does S/W always get better and better?
4. Main Goals of applications.
 A. Solve the user’s problems.
 The user is our neighbor. A Christian
programmer should see his/her work as
service to neighbor.
 Not appropriate to supply lots of unwanted
“features,” and bugs.
 B. Be user friendly.
 A is not the same as B. Why?
4. Main Goals continued.
 C. Serve the community. Programs serve
others as well as the user e.g. a payroll /
weather / flight reservation program that
does not work lets down more than the user.
 Consider a computer-controlled nuclear
power station.
 S/W affects more than just users.
5. The power of S/W.




Why is S/W so powerful?
Not because it is in a fancy, shrink wrapped
box!
Software is designed to give general
solutions, not specific ones.
5. The power of S/W continued.




Consider the following C++ instruction:
SalesTaxAmount = 100 * 0.05;
What is the problem with this instruction?
It cannot be used for other prices or other
sales tax rates. It is data dependent.
5. The power of S/W continued.
 What would be better:
 SalesTaxAmount = Price * SalesTaxRate;
 Note the use of variable names instead of
specific amounts. The variable names serve
as placeholders for any data value.
 This allows code reusability: the same
instruction can be reused with any data
values----->
5. The power of S/W continued.
 Code Reusability is achieved by the
separation of data and instructions.
 Instructions do not contain specific data
values but names of memory locations
which can be used to store any value.
 Mail-box analogy.