Using C Programming and #include only
Question 2 (35 marks) Jimmy wants a program that would help him manage the total amount of flowers that he picks daily from his garden for his home-based business. Develop a suitable program algorithm that considers the following guidelines as features of the system: a. Design two rows of a flower bed by setting each row to hold up to 6 different types of plants. All plants on the flower bed are marked with a label '@' as shown in Figure 2 below. (10 marks) Jimmy's flower plot design @ || @ || @ @ @ @ || @ @ . Start... Figure 2 Flower bed layout in two rows. b. Determine whether a flower plant has bloomed through appropriate question prompt and answer. Based on the answer given, an 'x' mark is indicated on the flower bed if a red flower is found and picked. This step is repeated on each row of the flower bed as shown in Figure 3. (15 marks) Start.. Please take one step forward Does the plant bloom a red flower? yes please take one step forward Does the plant bloom a red flower? ye Ops! Try again Does the plant bloom a red flower? no Please take one step forward Does the plant bloom a red flower? yes Please take one step forward Does the plant bloom a red flower? no Please take one step forward Does the plant bloom a red flower? yes please take one step forward Does the plant bloom a red flower? no End of flower bed row 1 ! Total red flowers are 3 C. Figure 3 'x' marked plot after picking a red flower. Calculate the total number of red flowers picked on each row of the flower bed and the overall total of flowers collected (see Figure 4). (5 marks) Start... Please take one step forward Does the plant bloom a red flower? no Please take one step forward Does the plant bloom a red flower? yes Please take one step forward Does the plant bloom a red flower? yes Please take one step forward Does the plant bloom a red flower? n Ops! Try again Does the plant bloom a red flower? no Please take one step forward Does the plant bloom a red flower? yes please take one step forward Does the plant bloom a red flower? no End of flower bed row 2 ! : Total red flowers are 3 Total flowers collected 6 Figure 4 Flowers collected on each row and the overall calculated. Evaluate data inputs for invalid values with suitable messages and prompts for new inputs based on the six-step limit on each row. (5 marks) d. END OF QUESTION PAPER