Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in Java language using JOptionPane( import javax .swing.JOptionPane) for both input and output. The program should include ideas and knowledge on the

Write a program in Java language using JOptionPane( import javax.swing.JOptionPane) for both input and output. The program should include ideas and knowledge on the following topics. a. Decision structure if /else if statements b. Use files, and loops concept c. Use methods d. Arrays and ArrayList Class e. Recursion function if needed.

Do not use

import java.util.*; import java.util.Map.Entry; 

Program 3

Researchers have found that when a book written in the English language is analyzed for letter frequencies, the expected order of the eleven most frequent letters beginning with the most frequent is: E-T-O-I-N-S-H-R-D-L-U. Your problem is to find and print the most frequent eleven letters appearing in the text from Sonnet #18 (see below). Ties will be decided in favor of the lower letter of the alphabet.

The input will be Shakespeares Sonnet #18 found below. You will need to store this in a data file, first removing all of the capitalization and punctuation, so you are only working with lower case letters.

The output consists of a string containing the most frequent eleven letters in the text in order from most frequent to less frequent. Ties will be listed alphabetically. Also, include the number of occurrence of each letter.

This program is to be well written and documented both internally and externally.

Sonnet #18

Shall I compare thee to a summer's day? Thou art more lovely and more temperate: Rough winds do shake the darling buds of May, And summer's lease hath all too short a date: Sometime too hot the eye of heaven shines, And often is his gold complexion dimm'd; And every fair from fair sometime declines, By chance or nature's changing course untrimm'd; But thy eternal summer shall not fade Nor lose possession of that fair thou owest; Nor shall Death brag thou wander'st in his shade, When in eternal lines to time thou growest: So long as men can breathe or eyes can see, So long lives this and this gives life to thee.

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_2

Step: 3

blur-text-image_3

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

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

10. Microsoft Corporation

Answered: 1 week ago

Question

4. EMC Corporation

Answered: 1 week ago