Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help understanding how to make this program in Java, while using the following conditions that are in the picture I provided. Such as

image text in transcribed
I need help understanding how to make this program in Java, while using the following conditions that are in the picture I provided. Such as using "indexOf, CharAt, etc.
contains a list of students ha 2 Output the first name, and the last name initial, both in capital letter, to an output file output.txt: Be sure to test to see if you opened the input and output files before you use them. You are required to use file input and output class. Grading criteria also include good documentation, descriptive variable names, and adherence to the coding convention noted on pages! & 2 You will first create a name.txt file, and input the following 10 randomly generated names (you can choose the names: Lilliana Sheley Vincenza Teamer Theron Beckler Kacie Velazquez Ione Exum Mel Lade Fernando Boxx Leonila Discher Sophie Pospisil Verlene Knapik Your program will then read cach line, and find the initial for the person's first and last name, and output the first and last name to the file "output.txt". You output.txt should like the same: Lilliana, s Vincenza, I Theron, B Hints: -Use the Scanner and PrintWriter classes in order to read and print from/to files. - Use hasNextLine() in a while loop to check if there are more names to read in the file and each line with the next.ined) method. Use the following methods to manipulate the string: indexOfString str): Returns the index within this string of the first occurrence of the specified substring. substring(int beginIndex, int endindex): Returns a new string that is a substring of this string. to UpperCase Converts all of the characters in this String to upper case using the rules of the default locale. charAt(int index): Returns the char value at the specified index. The first name and the last name is separated by the space. Use the indexOf() method of the String class to find the index of the blank space, the initial of the last name is the next index after the space

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

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions

Question

How to find if any no. is divisble by 4 or not ?

Answered: 1 week ago

Question

Explain the Pascals Law ?

Answered: 1 week ago