Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

code in C++ 1.5.1 o Button [Display maze] A combo box called cmbQ1_5 has been populated with the names of the three mazes, namely Maze

code in C++image text in transcribed

1.5.1 o Button [Display maze] A combo box called cmbQ1_5 has been populated with the names of the three mazes, namely Maze 1, Maze 2 and Maze 3. Three text files called Maze 1.txt, Maze 2.txt and Maze 3.txt are provided and stored in the AppData Folder. Each text file contains lines of characters that represent the layout of each maze respectively. The user must select a maze from combo box cmbQ1_5. Code has been provided to clear the component called redQ1_5. Write code to do the following: Extract the name of the selected maze from combo box cmb1_5. Display a suitable message if a text file does NOT exist for the selected maze. Do the following if a text file for the selected maze does exist: o Read ONE line at a time from the text file. o Save EACH line at the correct index in the array arrMaze provided. Display EACH line of the maze with its corresponding line number in the output component redQ1_5. o The lines represent the index of the rows Example of output if Maze 1 was selected from the combo box: Assignment 28 Question 1 Question 1.1 Question 1.2 Question 1.3 Question 1.4 Question1_5 CECECCCCCCCCCCCCC Choose the maze to display @------------- Maze 1 @##-###-#***+-+- 1.5.1 - Display maze -#- #----- @####-#-#-#-#- -@ @---------- 1.5.2 - Longest corridor @---------- @##-#######- -------- @-##---##-#### @----- @-11--11- @------------ @808068-000000 0 1 2 3 5 7 8 9 10 11 12 13 14 15 1.5.1 o Button [Display maze] A combo box called cmbQ1_5 has been populated with the names of the three mazes, namely Maze 1, Maze 2 and Maze 3. Three text files called Maze 1.txt, Maze 2.txt and Maze 3.txt are provided and stored in the AppData Folder. Each text file contains lines of characters that represent the layout of each maze respectively. The user must select a maze from combo box cmbQ1_5. Code has been provided to clear the component called redQ1_5. Write code to do the following: Extract the name of the selected maze from combo box cmb1_5. Display a suitable message if a text file does NOT exist for the selected maze. Do the following if a text file for the selected maze does exist: o Read ONE line at a time from the text file. o Save EACH line at the correct index in the array arrMaze provided. Display EACH line of the maze with its corresponding line number in the output component redQ1_5. o The lines represent the index of the rows Example of output if Maze 1 was selected from the combo box: Assignment 28 Question 1 Question 1.1 Question 1.2 Question 1.3 Question 1.4 Question1_5 CECECCCCCCCCCCCCC Choose the maze to display @------------- Maze 1 @##-###-#***+-+- 1.5.1 - Display maze -#- #----- @####-#-#-#-#- -@ @---------- 1.5.2 - Longest corridor @---------- @##-#######- -------- @-##---##-#### @----- @-11--11- @------------ @808068-000000 0 1 2 3 5 7 8 9 10 11 12 13 14 15

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

a. Do team members trust each other?

Answered: 1 week ago

Question

a. How will the leader be selected?

Answered: 1 week ago