-
i.First write a decomposition for the extended problem, based on the description in Box 1 above. This should be at a similar level of detail to the one given in the discussion to Activity 2.21 of Block 3 Part 2. The first sub-problem should be to set up a glossary, as before, but the rest of the decomposition needs modifying to reflect the extension to the problem.
-
ii.Expand the part of the
algorithm that deals with user interaction by instantiating the interactive loop Pattern 2.1 from Block 3 Part 2. You can see an example of this pattern being instantiated in the discussion for Activity 2.23; although, of course, your instantiation will be slightly different because the problem has changed.You can assume that, when asked if they know a definition, the user will always answer either y or n.
-
iii.Briefly discuss how you will test the program. Only a short answer is required and you do not need to give examples, only describe what approach you will follow.
-
iv.Now you will implement the instantiated pattern as Python code.
We have provided a starter script, which is included in the download for this TMA as Q2.py. Begin by saving a copy of the provided program as Q2_OUCU.py (where OUCU is your OU computer username, e.g. abc123).
The starter script is a modified version of the first complete version of the flashcard program, as developed in Block 3 Part 2. The definition of show_flashcard() is unchanged, as is the code that sets up the glossary, and you should not alter these parts of the program in any way.
Complete the new version of show_flashcard() by adding code, where indicated by comments, that will implement the algorithm you produced in Part (ii). You should use appropriate comments to make it clear how the code you have written corresponds to the steps in the algorithm.
Important: also make sure you write a suitable docstring for the modified program, to reflect the additional behaviour.
Copy the complete program into your Solution Document. Also include your completed .py file in your TMA zip file.
Step by stepSolved in 2 steps
- Consider the following multiplication problem: Given an integer list (an array) of size n, we want to calculate the product of all numbers in the list and display the result. (a) Define an instance of a problem in general. (b) Specify two different instances of the multiplication problem defined above. (c) What is the solution for each instance in part (b). How did you come up with that solution?arrow_forwardSuggest one further small extension or improvement of your own to the modified flashcard program. Outline what the extension does and briefly say what additional sub-problem(s) would need to be added to the initial decomposition. Note that you are only required to describe your further extension and do not need to implement it in code. The maximum word count is 150 words, including the added sub-problem(s).arrow_forwardImplement two versions of the successor function for the 8-puzzle: one that generates all the successors at once by copying and editing the 8-puzzle data structure, and one that generates one new successor each time it is called and works by modifying the parent state directly (and undoing the modifications as needed). Write versions of iterative deepening depth-first search that use these functions and compare their performance.arrow_forward
- Can you please help me with this problem because i am struggling with how to do this because I don't understand. I need help with question 2.7 part C but to answer question 2.7 part c you need question 2.6. But again i only need help with question 2.7. For the question of 2.7 part C, can you do it step by step using the pushdown automaton. Can you please show a vistual representation or drawings of the circles to help me understand it better. I only need help with questioin 2.7 part cquestion for 2.7 part C:2.7 Give informal English descriptions of PDAs for the languages in Exercise 2.6. question for 2.6 c. {w#x| w R is a substring of x for w, x ∈ {0,1} ∗ }arrow_forwardConsider the expression (6+3*4)/(7-1) In order to evaluate the expression it must be converted to Postfixnotation. Describe the process of conversion, then use that processto convert the above expression to Postfix. Note that if you don'tremember exactly how to process parenthesis, simply process them ina separate area until you get to the end of the parenthesized partof the expression. Then convert the expression to Postfix NOTE: You must show all work. Once you have your Postfix expression, now describe how to evaluateit. Then show the evaluation steps for the expression to generate afinal result. Again in order to get full credit you must show allwork.arrow_forwarda) Complete the program dependence graphs for the program shown above and 1. Add edges for data dependences in all graphs. 2. Combine the individual SDGs. In particular, you need to add call edges from the call sites tothe invoked method entry node, parameter-in edges from the actual parameters to the formalparameter nodes, and parameter-out edges from the return value ($ret) to the node where theresult is used or from the fields of objects that constitute a side-effect. 3. Add Summary Edges that summarize the effect of parameters on the result. Any summary edgesymbolizes a parameter that has a directed path from its parameter edge to the return value ofthe respective function invocation. b) Determine the 2-phase (context-sensitive) slice of the second call to println(o.get()). Which nodesare marked in the first phase, which in the second?arrow_forward
- Answer the given question with a proper explanation and step-by-step solution.arrow_forwardAs a software engineer you are required to produce designs to fulfill user requirements as described in SRS or User Stories. Suppose your software application needs to address the situation as given in respective scenarios (a-e). Your task is to answer the following for each of the given scenarios (a-e): [CLO-3]i. In terms of suitability which design pattern is most appropriate to address each situation? ii. Design/draw generic UML diagram to represent each situation.(a) You are writing a module for a university application that would allow students to apply for online clearance for final transcript issuance. As per policy students’ clearance is done from several offices before request for degree or final transcript could be approved.(b) After graduation, students would like to seek and search admissions in foreign countries. Usually students visit each university-website one by one. Generally they want to know about university ranking, fee, working opportunity, visa requirements etc.…arrow_forwardMake a BST implementation that uses three arrays to represent the BST: an array for keys, an array for left and right array indices, and an array for right array indices. The maximum size supplied in the constructor should be preallocated to the arrays. Compare the performance of your programme to that of the typical implementation.arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY