Question: Program Specifications Write a program to search for three parallel arrays containing customer credit card debt information. Identify statistics such as the number of customer

Program Specifications Write a program to search for three parallel arrays containing customer credit card debt information. Identify statistics such as the number of customer names that begin with "Sm", the number of customers with no debt, and the number of customers that live in a specific state.
Note: This program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress.
Step 0. Review the starter code in main (). The number of requested customers is input (integer). A method is called that reads data from a text file and fills three parallel arrays with customer names, state of residence, and amount of credit card debt for each customer. Using a method is a convenient way to fill arrays with hundreds of elements.
Step 1. Input a debt limit (integer), search phrase (String), and state abbreviation (String). Note that the number of customers is already input during Step 0.
Step 2. Use a loop to process each element of the names and debt arrays to identify the customer with the highest debt. Output a report header, number of customers, and the person's name with the highest debt. Submit for grading to confirm two tests pass.
Ex: If input is:
1000250 P LA
the output is:
U.S. Report
Customers: 1000
Highest debt: Sullivan
Step 3. Use a loop to process each element of the names array to count all customer names that begin with the specified search phrase. Ex: How many customer names begin with "Bre" or "L"? Hint: Use the startsWith() method in the String class. Output the number of customer names that start with the search phrase. Submit for grading to confirm four tests pass.
Ex: If input is:
50008000 Mor CA
the output is:
U.S. Report
Customers: 5000
Highest debt: Smith
Customer names that start with "Mor": 45
Step 4. Use a loop to process each element of the names and debt arrays to count the number of customers that have debt higher than the specified debt limit and the number of customers that have no debt. Output all results. Submit for grading to confirm six tests pass.
Ex: If input is:
15001000 R WY
the output is:
U.S. Report
Customers: 1500
Highest debt: Sullivan
Customer names that start with "R": 90
Customers with debt over $1000: 1176
Customers debt free: 324
Step 5. Repeat steps 2-4 for all customers living in the specified state. Hint: Use the equals() method in the String class to confirm a customer lives in the specified state. Output all results including a header for the state report. Submit for grading to confirm all tests pass.
Ex: If input is:
25005000 K TX
the output is:
U.S. Report
Customers: 2500
Highest debt: Sullivan
Customer names that start with "K": 71
Customers with debt over $5000: 1280
Customers debt free: 543
TX Report
Customers: 196
Highest debt: Dobbs
Customer names that start with "K": 5
Customers with debt over $5000: 110
Customers debt free: 43

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!