Part A -Text messaging is a popular means of communications. Many abbreviations
ID: 3557484 • Letter: P
Question
Part A-Text messaging is a popular means of communications. Many abbreviations are in common use but are not appropriate for formal communications. Suppose the abbreviations are stored, one to a line, in a text file names abbreviation.txt. For example, the file might contain these lines:
lol
:)
iirc
4
u
ttfn
Write a program that will read a message from another text file and surround each occurrence of an abbreviation with <> brackets. Write the marked message to a new text file.
For example, if the message to be scanned is
How are u today? Iirc? This is your first free day. Hope you are having fun! :)
The new text file should contain
How are <u> today? <Iirc>, this is your first free day. Hope you are having fun! <:)>
Part B- Write an application or applet that implements a simple text editor. Use a text field and a button to get the file. Read the entire file as characters and display it in the JTextArea. The user will then be able to make changes in the text area. Use a Save button to get the contents of the text area and write that over the original file. Create an Exit button to exit the application.
Technical Details: Read each line from the file and then display the line in the text area using the method append (aString). The method getText will return all of the text in the text area in a string that then can be written to the file. The following statement will make the text referenced by editorTextArea scrollable:
JScrollPane scrollPane = new JScrollPane(editorTextArea);
Then add scrollPane to your GUI, just as you would add any other component. The text area editorTextArea does not need to be added to the GUI, but it can be used.
Part C
Explanation / Answer
contact on timacs12@gmail.com