subject

Write a program that takes a String containing a text using the method signature String useProperGrammar(String text)
Your method should replace the word ‘2’ with ‘to’ and return the updated text.

For example,

useProperGrammar("can you go 2 the store?")
should return

"can you go to the store?"
This method should also print out the number of grammatical errors that were fixed.

For example, for useProperGrammar("back 2 back 2 back"), the method would also print:

Fixed 2 grammatical errors:
In the main method, ask the user to input a String, and print the results of useProperGrammar using the user input.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the can apple do to fix this issue?
Answers: 1
question
Computers and Technology, 24.06.2019 03:00
Using a conditional expression, write a statement that increments numusers if updatedirection is 1, otherwise decrements numusers. ex: if numusers is 8 and updatedirection is 1, numusers becomes 9; if updatedirection is 0, numusers becomes 7.
Answers: 1
question
Computers and Technology, 24.06.2019 07:30
John recently worked on a project about various programming languages. he learned that though procedural language programs are useful, they have disadvantages too. what is a disadvantage of programs written in procedural languages? a. programs do not represent data complexity. b. programs take more time to execute. c. programs are prone to security threats. d. programs do not interface with multiple platforms.
Answers: 3
question
Computers and Technology, 24.06.2019 15:30
If you want to delete an entire word at a time, which key should you press along with the backspace or delete key?
Answers: 1
You know the right answer?
Write a program that takes a String containing a text using the method signature String useProperGr...
Questions
question
Mathematics, 06.05.2020 06:06
question
Biology, 06.05.2020 06:06
question
History, 06.05.2020 06:06
question
Mathematics, 06.05.2020 06:06
Questions on the website: 13722362