Question: JAVA Having some trouble with my assignment, posted the assignment, and my code below. Please adjust my code (do not write a completely new program).
JAVA Having some trouble with my assignment, posted the assignment, and my code below. Please adjust my code (do not write a completely new program). 
MY CODE SO FAR:
import java.util.Scanner; import java.io.*; public class Customers { public static void capitalizeArray(String[] customers) { for (int i = 0; i
THIS IS WHAT GOES IN TO names.txt
Barbara Stanton F Timoteo Martinez
M
Ally Gu
O
Xing Xiao
M
Dung Kim
F
Tanya White
F
Alan Ngo
M
Abir Fadel
M
Nataly Luna
F
Charles Atkinson
M
Stacey Cahill
O
Stephanie Teatro
F
Ping Li
M
June Park
F
Binh Nguyen
M

Assignment 21.2: Customer Data (10 pts) Write a program that reads in a series of names, along with their gender, from a file. The file is called names.txt. The program uses a loop to read in each name from the file and store each person's title (Mr. or Ms. or Mx.) name in an array called customers Note: you can assume that the size of the array is know ahead of time to be 15 The program should then call two methods. The first method: The method is named capitalizeArray It take in a String array It alters the values in the String array to capitalize all of the letters . This method must use a for loop. It cannot call any outside methods that we have not discussed in this class It returns nothing. The second method: The method is named print It takes in an array of Strings It opens up a new PrintWriter and connects it to a file called customers.txt It prints out the array to the file using a for loop It closes the PrintWriter It returns nothing Once you have filled the customers array with titles and names, call the capitalizeArray method to capitalize all the names in the array. Next, call the print method to display each of the capitalized names in the customers.txt file Copy and paste the starter code below into a new file called Customers.java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
