Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In IntelliJ Java (Azul Zulu version) I need to code a program that counts punctuation symbols in a String. (Below are the instructions and example

In IntelliJ Java (Azul Zulu version) I need to code a program that counts punctuation symbols in a String.
(Below are the instructions and example output. Please ignore the other conversion options and help me make a program that does # 1 conversion option)
image text in transcribed
image text in transcribed
4. The first three of the above options will be implemented in separate methods. Refer to the following information in implementing the methods described below. To count the number of punctuation marks in a corpus of text, perform the following steps: - Create integer variables named periods (.), questions (?), commas (,), exclamations (!), apostrophes ('), semicolons (;), and backslashes ( ). Initialize each to zero. - For each character in the String of Lext (from left to right): - Retrieve the character at the current index. - Ir the character is equal to a certain punctuation mark, increment its counter. - Print each counter variable along with a description followed by a new line. When the comter is 1, the singular version of the deseription should be used. Otherwise, the plural version should be used. Example Program Execution User input is indicated as bold text. Copying apostrophes from below will cause an error. - - Conversions Menu - - Enter '1' to count punctuation symbols in a String. Enter ' 2 ' to convert characters to binary. Enter ' 3 ' to convert 8-bit binary to a character. Enter '4' to exit. 1 Enter a few sentences: You may talk o' gin and beer \When you're quartered safe out 'ere, \An' you're sent to penny-fights an' Aldershot it; You entered 0 periods, 0 question marks, 1 comma, 0 exclamations marks, 6 apostrophes, 1 semicolon, and 2 backslashes

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions