{"functions":[],"name":"Mod01CourseProject","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_a8cebb30_f1d6_4dae_a466_37f9ebd7f4a0"},{"@type":"Comment","id":"id_24f73c89_99f0_4c01_94ab_8a6315e1a925","text":"Declare a variable to hold a menu choice"},{"@type":"Declare","tpe":"Integer","name":"menuChoice","id":"id_ebd8dfa8_5dfe_4dd7_88ed_9b3764b6398c","initValue":null},{"condition":"menuChoice != 4","@type":"DoWhile","id":"id_224ecdfe_d24e_493e_a794_43fcd83289e1","body":{"statements":[{"@type":"Comment","id":"id_ca757d34_7f2c_4954_a96a_05fee7f6feee","text":"Display the menu options 1. add a book 2. edit a book 3. remove a book 4. exit the application"},{"newline":true,"@type":"Output","id":"id_3b074de1_9432_4c03_807d_17c02410c620","value":"\"Choose from one of the following options:\""},{"newline":true,"@type":"Output","id":"id_1060f96b_bad1_45dc_9e52_15ebd1fb2733","value":"\"1. Add a book\""},{"newline":true,"@type":"Output","id":"id_a0a97f2d_2f56_45b0_a80b_9ba9a3f3e8ec","value":"\"2. Edit a book\""},{"newline":true,"@type":"Output","id":"id_c9ad7155_1934_4cab_8176_d454eb41ca4c","value":"\"3. Remove a book\""},{"newline":true,"@type":"Output","id":"id_099b6144_e68f_4fdb_828b_6f7699aa7ee1","value":"\"4. Exit the application\""},{"@type":"Comment","id":"id_fefcde3f_4b49_4345_99bc_38b490a1bf15","text":"ask the user for the input of the menu choice"},{"@type":"Input","name":"menuChoice","id":"id_a79f4661_3c4d_4a9f_b029_7aa7b1845f5f","prompt":"Enter your choice (1, 2, 3, or 4): "},{"@type":"Comment","id":"id_137e808c_2879_40e9_857e_8e1e0f44c29b","text":"if the user chooses an invalid choice, display an error and reprompt / redisplay the menu and get another choice"},{"condition":"menuChoice < 1 || menuChoice > 4","@type":"While","id":"id_350e343a_ad08_4d8a_8e92_e7bebabbf7d2","body":{"statements":[{"newline":true,"@type":"Output","id":"id_c607c5ff_6241_4745_b9d3_86f3e0c2881f","value":"\"ERROR: Invalid Menu Choice. Try Again.\""},{"newline":true,"@type":"Output","id":"id_3e1c2b93_dcc1_4acd_b0ae_520aef78f970","value":"\"Choose from one of the following options:\""},{"newline":true,"@type":"Output","id":"id_a8eee72c_dd83_45dc_89c0_39378367bd6d","value":"\"1. Add a book\""},{"newline":true,"@type":"Output","id":"id_5013a7b7_45b4_4d43_b802_fd882779ce36","value":"\"2. Edit a book\""},{"newline":true,"@type":"Output","id":"id_923f3ef6_e3e4_40ab_b8a4_ff34ca3195c5","value":"\"3. Remove a book\""},{"newline":true,"@type":"Output","id":"id_a4849866_a8e0_4b22_a7f3_7f239548e8d7","value":"\"4. Exit the application\""},{"@type":"Comment","id":"id_879f8540_c415_44f5_ac36_89b968a5abc0","text":"ask the user for the input of the menu choice"},{"@type":"Input","name":"menuChoice","id":"id_8115f825_d6d8_4875_92d4_679b2fed2114","prompt":"Enter your choice (1, 2, 3, or 4): "}],"id":"id_233c780c_05aa_450e_bed0_50f87c16fced"}},{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"@type":"Comment","id":"id_5a359408_466a_4741_a3f9_f76e7b32a162","text":"if the user chooses option 4"},{"newline":true,"@type":"Output","id":"id_eb1d547f_ed69_4089_bf2e_4ce3f078c95f","value":"\"You chose to exit the application. Thank you!\""}],"id":"id_adf01b57_b63b_4ef4_adad_5edbca1c152f"},"trueBlock":{"statements":[{"@type":"Comment","id":"id_151f817c_edfd_492c_ae48_4f32cf49cf4d","text":"if the user chooses option 3"},{"newline":true,"@type":"Output","id":"id_a82c47a6_859a_404b_9fe2_761a81acf28d","value":"\"You chose to remove a book.\""}],"id":"id_033e69ed_7c55_47f6_a2c8_a17ecb6c5b75"},"condition":"menuChoice == 3","@type":"If","id":"id_01598099_e09f_4266_81d0_e7f8718549e5"}],"id":"id_bd96d599_c91f_4ce6_a423_a97745fcba27"},"trueBlock":{"statements":[{"@type":"Comment","id":"id_7dda9216_9fa4_49cc_9961_40d6250822b6","text":"if the user chooses option 2"},{"newline":true,"@type":"Output","id":"id_5bb4c6b9_639c_41ca_9f8d_12ccb739f491","value":"\"You chose to edit a book.\""}],"id":"id_08c66454_953c_49c3_bb23_7671bb7f3733"},"condition":"menuChoice == 2","@type":"If","id":"id_2c59ef90_727a_43d5_8e06_3c3c13be8dd0"}],"id":"id_4d0c325f_2e1a_4813_b135_45f455f9e584"},"trueBlock":{"statements":[{"@type":"Comment","id":"id_93be37ec_04f4_425f_a40c_0ad71ac0d460","text":"if the user chooses option 1"},{"newline":true,"@type":"Output","id":"id_e07d78ce_ea38_4ad1_8f6e_f917ea17dd72","value":"\"You chose to add a book.\""}],"id":"id_750e84c3_98d6_4259_83d5_06675de57b9a"},"condition":"menuChoice == 1","@type":"If","id":"id_b38ec9cb_395c_4b5d_9b84_bed28b592055"}],"id":"id_d7612c3a_ebbf_4251_aae7_ea857a133968"}},{"@type":"Return","id":"id_ce4f4cdf_ba62_4261_a21a_fad7762d6048","maybeValue":null}],"parameters":[]},"id":"id_dc61e1c9_2375_4874_81a5_b1cc02cb10b0","config":{"showDebugVars":true,"showIoBtns":true,"showFunctions":true,"lang":"java","showGenCode":true},"version":"0.2","revision":277}