正在加载图片...
$20.2 A SIMPLE-MINDED ATTEMPT 677 A transition Initial diagram Help Help 1 Help Help 3 Confirmation Enquiry 5 on flights 2 3 Reservation Enquiry on seats 2 Help Help 20.2 A SIMPLE-MINDED ATTEMPT Let us begin with a straightforward,unsophisticated program scheme.This version is made of a number of blocks,one for each state of the system:BEnuin BReseo B etc.A typical block (expressed in an ad hoc notation,not the object-oriented notation of this book although it retains some of its syntactic conventions)looks like this: BEnquir “Display Enguiry on flights panel'” repeat "Read user's answers and choice C for the next step" if“Error in answer”then“Output appropriate message”end until not error in answer end Process answer” case Cin Co:goto Exit, C:goto BHelp C2:goto BReservation end and similarly for each state.§20.2 A SIMPLE-MINDED ATTEMPT 677 20.2 A SIMPLE-MINDED ATTEMPT Let us begin with a straightforward, unsophisticated program scheme. This version is made of a number of blocks, one for each state of the system: BEnquiry , BReservation, BCancellation etc. A typical block (expressed in an ad hoc notation, not the object-oriented notation of this book although it retains some of its syntactic conventions) looks like this: BEnquiry: “Display Enquiry on flights panel” repeat “Read user’s answers and choice C for the next step” if “Error in answer” then “Output appropriate message” end until not error in answer end “Process answer” case C in C0: goto Exit, C1: goto BHelp, C2: goto BReservation, … end and similarly for each state. Initial Confirmation Reservation Enquiry_ on_flights 2 2 2 2 2 3 3 3 3 3 1 1 1 1 1 1 1 1 Enquiry_ on_seats Help Help 1 1 Help Help Help Help 1 1 1 2 3 4 5 A transition diagram
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有