Week 8 The electronic telephone book - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

Week 8 The electronic telephone book

Description:

the program exits the phone book text. file is deleted and the contents of the ... a new phone book text file. User defined structure or event ... – PowerPoint PPT presentation

Number of Views:28
Avg rating:3.0/5.0
Slides: 9
Provided by: CET
Category:

less

Transcript and Presenter's Notes

Title: Week 8 The electronic telephone book


1
Week 8 The electronic telephone book
  • Sequential files and user defined structures

2
Steps to a solution
  • Complex program specification - need to take
    design through several distinct stages
  • Data design
  • - What data needed, how is it stored?
  • Architectural design
  • - Program modules and how they interact
  • Procedural design
  • - Individual design of each module

3
Data design (1)
  • Internal data structure use list box

4
(No Transcript)
5
Data design (2)
  • Global declarations
  • Const cAppsPath C\Temp\phone.txt
  • Dim gNumbers(1 To 5, 9 To 16) As String
  • Using the array
  • E.g. to input a name and phone no
  • - input-number required -
  • - input a name
  • - store appointment gNumber(name,number) record

6
PROCESS
INPUT From file
OUTPUT to file
Program reads text file and stores data in user
defined data structure. When the program exits
the phone book text file is deleted and the
contents of the user defined structure is used
to create a new phone book text file.
Phone Book- Plan text file Can be read in
Notepad
Phone Book- plan text file
7
User defined structure or event
  • The statement for triggering an event is located
    in the class module
  • the event is dealt with in the form code

8
Completed structure chart
Main program Form_Click
GetCommand
SaveNo
AddNo
New entry
DelNo
Modify entry
Carry out commands till user chooses exit
Display tel no
ShowNo
Exit
Write a Comment
User Comments (0)
About PowerShow.com