utar ipo chart.docx - int main Input choice_num decice_num...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
int main( ) Input Process Output choice_num decice_num 1) Set decide_num = 0 2) Prompt and Get choice_num 3) Compare choice_num 4) Call decide_num = user_choice( ) 5) Read decide_num 6) Display “Thank you ” 7) END “Thank you” DISPLAY_HOME_SCREEN Set decide_num = 0 REPEAT REPEAT Prompt and Get the choice_num UNTIL choice_num >= 1 AND choice_num <= 2 CASEOF choice_num 1: Call decide_num = user_choice( ) Read decide_num 2: Display “Thank you for using speedy bullet train ticket reserving system” ENDCASE UNTIL decide_num !=1 END
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
int user_choice( ) Input Process Output name age ic phone choice_num train_choice bank_select 1) Prompt and Get name 2) Prompt and Get age 3) Compare age 4) Prompt and Get ic 5) Prompt and Get phone 6) Prompt and Get choice_num 7) Call display_train_detail( ) 8) Prompt and Get train_choice 9) Call departure_choice = departure_selection(train_choice) 10) Call arrival_choice = arrival_selection(departure_choice) 11) Call time_choice = time_selection(departure_choice, arrival_choice) 12) Display name 13) Compare age 14) Display age, ic, phone 15) Call print_train_type(train_choice) 16) Call print_departure_arrival(departure_choice, arrival_choice) 17) Call print_time(departure_choice, arrival_choice, time_choice) 18) Call calculate_price(train_choice, age) 19) Prompt and Get bank_select 20) Call choice_num = bank_selection(bank_select) 21) Read choice_num 22) Return choice_num 23) END name age ic phone
Image of page 2
void display_train_detail( ) Input Process Output 1) Display “Please choose your train type:” 2) Display “train type”, “description” 3) Display “*Half price for 11 years old or below.” 4) END “Please choose your train type:”
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern