You must submit a single .zip archive file of your project folder. Use a utility
ID: 641377 • Letter: Y
Question
You must submit a single .zip archive file of your project folder. Use a utility that produces .zip files (Windows or Mac compression utility).
Objectives:
- To generate random numbers
- To use decision and repetition
- To make use of methods and passing values
Project setup:
Use your Netbeans IDE to create the project hw05. This project should have a single class file, Main.java
.
Refer to the appropriate "how to" tutorials available on the course website, for instructions on how to create a project and manage its files.
Language features used:
- if, switch statements
- string methods
- methods
Problem Description:
In this assignment you are to make use of the string class and its methods to analyze some text. The user will enter some text and the program will analyze it and display the results. Refer to the sample screen captures.
------------------------------------------------------------------------------------------------------------------------------------RUN 1
run:
Enter string to analyze: hello
String analysis results:
length: 5
vowel count: 2
consonant count: 3
word count: 1
ASCII sum: 532
Character frequencies:
A:0% B: 0% C: 0% D: 0% E: 20% F: 0% G: 0% H: 20% I: 0% J: 0% K: 0% L:40% M:0%
N:0%O: 20% P: 0% Q: 0% R: 0% S: 0% T: 0% U: 0% V: 0% W: 0% X: 0% Y: 0% Z:0%
---------------------------------------------------------------------------------------------------------------------------------RUN 2
run:
Enter string to analyze:
The quick brown fox jumped over the lazy dog
String analysis results:
length: 44
vowel count: 12
consonant count: 24
word count: 9
ASCII sum: 4143
Character frequencies:
A: 2% B: 2% C: 2% D: 5% E: 9% F: 2% G: 2% H: 5% I: 2% J: 2% K: 2% L: 2% M:2%
N: 2% O: 9% P: 2% Q: 2% R: 5% S: 0% T: 5% U: 5% V: 2% W: 2% X: 2% Y: 2% Z:2%
-----------------------------------------------------------------------------
Program requirements:
The requirements for this program are as follows:
(1) Use the Main.java file provided as the starting point.
This file contains all the methods you are to implement. Each is commented with what it does, so refer to these comments for details.
(2)Test your code with the two samples shown above to make sure that your results are the same as the one shown.
As you write your programs from here on out, documentation will be desirable and an essential
part of your code.
Explanation / Answer
Top of Form
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.