1. The textabbrv.txt file is provided for you on Canvas. You are to use this text...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. The textabbrv.txt file is provided for you on Canvas. You are to use this text file and write and program as shown in the output sample. Allow the user to run the program as many times as the user wants. You must provide at least 5 test cases. a. You are to write a program where the user enters an abbreviation and your program will translate it to English. b. your program should take into consideration all punctuation marks that the user enters and displayed it in the English translation. c. You are to use dictionary. You may use list, tuples, sets if you need to. Below is the textabbr.txt file contents: rare u:you ttyl:talk to you later 18:late brb:be right back lol:laughing out loud bbl:be back later tldr:too long; didn't read rofl:rolling on floor laughing gtg:got to go cya:see you cuzz:because bff:best friend forever The output should display: >>> Enter a message to be translated: ru, lol ? The translated text is: are you, laughing out loud ? >>> (prompt for the user) (user input the abbreviation) (your program translates and prints the next 2 lines including punctuations) r: are y: why u: you ttyl: talk to you later 18:late brb: be right back lol:laughing bbl: be back later. tldr: too long; didn't read rofl: rolling on floor laughing gtg:got to go cya: see you cuzz:because out loud bff:best friend forever idk: I don't know sup: what's up? omg: oh my gosh nbd: no big deal tisnf: this is not fair nw: no way! rus: are you serious? myob:mind your own business njoy: enjoy nter:enter 1ce: once aka: also known as afk: away from keyboard jk:just kidding asap: as soon as possible app:application. atm:at the moment b4:before fyi: for your information bday:birthday k: okay msg:message np: no problem pic:picture plz:please sry: sorry dunno: don't know wut: what wuts: what's 1. The textabbrv.txt file is provided for you on Canvas. You are to use this text file and write and program as shown in the output sample. Allow the user to run the program as many times as the user wants. You must provide at least 5 test cases. a. You are to write a program where the user enters an abbreviation and your program will translate it to English. b. your program should take into consideration all punctuation marks that the user enters and displayed it in the English translation. c. You are to use dictionary. You may use list, tuples, sets if you need to. Below is the textabbr.txt file contents: rare u:you ttyl:talk to you later 18:late brb:be right back lol:laughing out loud bbl:be back later tldr:too long; didn't read rofl:rolling on floor laughing gtg:got to go cya:see you cuzz:because bff:best friend forever The output should display: >>> Enter a message to be translated: ru, lol ? The translated text is: are you, laughing out loud ? >>> (prompt for the user) (user input the abbreviation) (your program translates and prints the next 2 lines including punctuations) r: are y: why u: you ttyl: talk to you later 18:late brb: be right back lol:laughing bbl: be back later. tldr: too long; didn't read rofl: rolling on floor laughing gtg:got to go cya: see you cuzz:because out loud bff:best friend forever idk: I don't know sup: what's up? omg: oh my gosh nbd: no big deal tisnf: this is not fair nw: no way! rus: are you serious? myob:mind your own business njoy: enjoy nter:enter 1ce: once aka: also known as afk: away from keyboard jk:just kidding asap: as soon as possible app:application. atm:at the moment b4:before fyi: for your information bday:birthday k: okay msg:message np: no problem pic:picture plz:please sry: sorry dunno: don't know wut: what wuts: what's
Expert Answer:
Answer rating: 100% (QA)
Code Define the main function def main Open the file to be read infile opentextabbrvtxt Define an em... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these general management questions
-
Write a GUI program as shown in Figure 16.36a. You can use buttons to move the message to the left and right and use the radio buttons to change the color for the message displayed. Programming is...
-
Discuss five (5) criteria than an organization should take into consideration when preparing a code of ethics.
-
Your best friend wants to know why on earth you are taking a fraud examination class. He is curious about what careers this class prepares you for. Go to the Internet and find information about two...
-
Andrew owns a commercial office building that is insured under three property insurance contracts. He has $100,000 of insurance from Company A, $200,000 from Company B, and $200,000 from Company C....
-
Nitrogen enters a converging-diverging nozzle at 620 kPa and 310 K with a negligible velocity, and it experiences a normal shock at a location where the Mach number is Ma = 3.0. Calculate the...
-
10 year old child arrives to the clinic accompanied by a parent three days following a right ankle fracture that required internal fixation with.. The parent reports the child is doing well but ask...
-
A model hydrofoil is to be tested. Is it practical to satisfy both the Reynolds number and the Froude number for the hydrofoil when it is operating near the water surface? Support your decision.
-
Taylor Marina has 300 available slips that rent for $800 per season. Payments must be made in full by the start of the boating season, April 1, 2018. The boating season ends October 31, and the...
-
1. Define "noble cause corruption" and provide an example of this mindset that is not discussed in any textbook. Could you please explain with further details. 2. Many police services include...
-
The following summarized data (amounts in millions) are taken from the September 26, 2020, and September 28, 2019, comparative financial statements of Apple Incorporated, a company that designs,...
-
Calculate the percentage price change for 4 bonds with different annual coupon rates (5% and 10%) and different maturities (3 years and 10 years), starting with a common 7.5% YTM (with annual...
-
Indicate whether each of the following statements is true or false by writing T or F in the answer c olumn. In most cases, duties required in an employment contract are not delegable.
-
Indicate whether each of the following statements is true or false by writing T or F in the answer c olumn. Any warranty can be canceled if the seller claims that it is causing him or her to lose...
-
What happens in a city with too many hair stylists and too few aerobics instructors?
-
Does owning ones own land make a difference?
-
Suppose most fans prefer Sunday afternoon baseball games (regardless of opponent) to all other types of games. Describe two pricing strategies that a team could use to increase profits based on this...
-
A beam of electrons strikes a barrier with two narrow slits of equal width, separated by 11 nm. A screen is located 10 cm beyond the barrier, and electrons are detected as they strike the screen. The...
-
SCHEDULE OF COST OF GOODS MANUFACTURED The following information is supplied for Sanchez Welding and Manufacturing Company. Prepare a schedule of cost of goods manufactured for the year ended...
-
Write a program that demonstrates the properties of a text area. The program uses a check box to indicate whether the text is wrapped onto next line, as shown in Figure 16.41a. Four score and seven...
-
Implement the clone and equals methods in the BST class. Two BST trees are equal if they contain the same elements. The clone method returns an identical copy of a BST.
-
Write a GUI program for Programming Exercise 8.19, as shown in Figure 16.49a?b. Let the user enter the numbers in the text fields in a grid of 6 rows and 7 columns. The user can click the Solve...
-
Explain how the financial manager might use industry norms in the design of the companys financing mix.
-
You have developed the following income statement for Sing-Tel Corporation. It represents the most recent years operations, which ended yesterday. Your supervisor in the controllers office has just...
-
Footwear, Inc. manufactures a complete line of mens and womens formal shoes for independent merchants. The average selling price of its finished product is \($85\) per pair. The variable cost for...
Study smarter with the SolutionInn App