Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MS Word is a powerful text editor that provides many features. One of these feat

ID: 3738737 • Letter: M

Question

MS Word is a powerful text editor that provides many features. One of these features is the 'Word Count..." see figure 1. In this assignment, you need to write a program that counts and displays: Word Count ce Pages 1- Number of lines in a text (string). 2- Number of whitespaces. 3- Number of vowels. 4- Words count. Characters (no soaces Characters twith spaces 838 35 59 Unes Indlude footnotes and endnotes Requirements: Implement this task using JavaFx -you should not use Scene Builder nor FXML You may create a simple editor similar to Notepad (with menu) to allow test editing. Test your code before submission.

Explanation / Answer

Here is the instruction codes to use in the program or i can say part of the logic of the program

From your TextArea

TextArea textArea = new TextArea();

Take the text

String toCount = textArea.getText();

Split it into lines

String[] lineArray = toCount.split(" "); //for new line use for word count use " " space and use your requirements

Index 0 to lineArray.length -1 is your lines - where lineArray.length -1 is your total.

here is the entire code

//importing the required packages

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote