Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that does the following: 1) Create an ArrayList to hold Strings 2) Using a loop, input individual names from a textfile called
Write a program that does the following: 1) Create an ArrayList to hold Strings 2) Using a loop, input individual names from a textfile called students.txt and add them to the ArrayList. (Read in both names as a single String.) Assume you do not know how many names are in the file. a) Example file contents looks like Smith, Mary Jones, Samuel 3) After you have read all of the data in the file a) b) Second use a While Loop to read all the names from the ArrayList and print out all the names c) See example list for formatting First use a While Loop to read all the names from the ArrayList and print out all the names whose first letter of their last name falls in the range A-L. (Indent the name) whose first letter of their last name falls in the range M-Z (Indent the name)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started