CSCI110 EventDriven Programming Using Visual Basic - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

CSCI110 EventDriven Programming Using Visual Basic

Description:

none – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 24
Provided by: AnneD71
Category:

less

Transcript and Presenter's Notes

Title: CSCI110 EventDriven Programming Using Visual Basic


1
CSCI110 Event-Driven Programming Using Visual
Basic
2
  • Problem Solving

3
Problem Solving
  • The problem solving techniques introduced here
    can be applied to most kinds of problems, not
    just problems to be converted into computer
    programs.

4
A typical problem at the college
  • How to switch on in to a computer in a
    Computer Science room in this college, and start
    up the Notepad program to write and save a
    document to any directory on the computer.

5
Exercise
  • Using Notepad, write a document to solve the
    problem shown on the previous screen.

6
Problem Solving and Computer Programming
  • Algorithms
  • Program Design
  • Software Lifecycle

7
Algorithms
  • An algorithm is a sequence of precise
    instructions (written in English) that leads to
    the solution to a problem.
  • An algorithm can be compared to a recipe to
    bake a cake, a set of directions to enroll for a
    class or a set of instructions to install an
    operating system...

8
Program Design
  • problem solving phase
  • (results in an algorithm)
  • implementation phase
  • (results in the program developed from
    the algorithm)

9
Software Lifecycle
  • 1. Problem definition
  • 2. Algorithm design
  • 3. Coding
  • 4. Testing
  • 5. Maintenance

10
(No Transcript)
11
  • Table 1 Relative costs of software systems
  • System Type Phase costs ()
    ___________________________________
    ___
  • Design
    Coding Testing
  • Control system 46 20 34
  • Spaceborne system 34 20 46
  • Operating system 33 17 50
  • Scientific system 44 26 30
  • Business system 44 28 28

12
Data from Table 1
  • Boehm,B.W. (1981) Software Engineering
    Economics, Prentice Hall

13
Note!
  • According to the data in Table 1, when you are
    developing a computer program, you should be
    spending only one quarter of the time on actually
    typing in the computer program (aka code)! This
    is called the implementation stage.
  • Most of the time should be spent on design
    and testing.

14
Design and Testing
  • The Design and Testing stages in the
    development of any computer system (program) are
    the most expensive stages.

15
Tools for Software Design
  • Flowcharts
  • Pseudocode
  • Hierarchy Charts

16
Documentation
  • Any paperwork associated with a computer
    program is know as external documentation
  • Internal documentation are any comments you
    make in the program code itself...

17
Documentation
  • Requirements Phase (what the program has to do)
  • Design Phase (how it will do it)
  • Coding Phase (the code itself)
  • Testing Phase (the test data and results)
  • Operation Phase (the user manual)

18
Tools for Software Design
  • Flowcharts
  • Pseudocode
  • Hierarchy Charts

19
Start
input 3 numbers
Flowchart of a program to calculate the average
of 3 numbers
calculate total
divide total by 3
output result
End
20
input the numbers calculate the total calculate
the average output the result
Pseudocode of a program to calculate the average
of 3 numbers
21
Hierarchy chart of a program to calculate the
average of 3 numbers
Calculate average of 3 numbers
print out the result
divide the total by 3
calculate the total
input the numbers
22
  • End of VB_ProblemSolving.ppt

23
  • Last updated Friday 2nd January 2009, 1545 PT
    by AHD
Write a Comment
User Comments (0)
About PowerShow.com