Question: Problem 3: Reversing a String String manipulation is an important part of record and document analysis. A simple string manipulation task is reversing a

Problem 3: Reversing a String String manipulation is an important part ofrecord and document analysis. A simple string manipulation task is reversing a

Problem 3: Reversing a String String manipulation is an important part of record and document analysis. A simple string manipulation task is reversing a string-constructing a new string in which the letters appear in the opposite order. The file, "hw2_problem3.py", contains two functions, reverse1() and reverse2(). Each function takes a single argument, s, which is a string. Both functions are going to construct the reverse of s and then return it. Complete the body of both functions in the following ways. In reverse1() use a loop to construct a reversed string. Then return the reversed string. In reverse2() use slicing to construct the reversed string, and then return the reversed string Examples: Function Call Return Value reverse("Mississippi") "ippississiM" reverse2("Mississippi") reverse("Connetquot") "touqtennoC" reverse2("Connetquot") reverse("Wyandanch") "hcnadnayW" reverse2("Wyandanch") reverse("Ronkonkoma") "amoknoknoR" reverse2("Ronkonkoma") Exercise 3 . Create a simple Graphical User Interface (GUI): Create new JFrameForm and use the Palette to drag and drop the Swing Containers and Controllers like the figure shown. String Manipulation File Name: Your Form should accept a file name in its text field. When the user presses OK Button, the content of the String array appear in the Text area below. String Manipulation OK File Name: input.txt OK hello welcome itbp219 section01

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!