Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For java only please.... Step 1: Open Notepad on your computer. Type in five lines of text. Save the file. Write down the exact location

For java only please....

Step 1: Open Notepad on your computer. Type in five lines of text. Save the file. Write down the exact location and name of the file. Do not forget the .txt when you write the name down. Notepad automatically saves your file with the .txt extension.

Step 2: Create a Java project that has only one class, the driver. In main( ) write the code to read the data from step 1 and print each line of text to the screen.

Step 3: Create a new Java project. This project has only class, the driver with main( ). In main( ) write the code to create a file for output. Enter seven lines of text to write to the output file.

Once the code is written to save all the lines to the file, write the code to print a message to the screen stating that the output file was created.

Run main( ), then check your computer to verify the data file was created and the contents are correct. Open the text file using Notepad to verify your data was saved as a text file.

Step 4.

Create a new Java project. This project has only one class, the driver with main( ). In main( ) open a file for input. Use the text file you created in Step 3 above. The

main()method needs to accomplish the following tasks. You can declare and use variables in main( ) and read one physical line of data at a time.

Read all the steps a-e below before writing any code.

a) Count and print how many times the letter e or E appear in the file.

b) Count and print how many vowels are in the data file.

c) Count and print how many characters (including blanks, but not newlines) are in the file.

d) count and print the number of times a non-space character is preceded by a space character.

e) Print the contents of the file on the screen in all uppercase.

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

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions

Question

1. How do people generally perceive technology and media?

Answered: 1 week ago