1) Customers: Create an array of customer names. (For this Unit, you should store first and last names in one field, in the format "Last_name, First_name".) Populate the array with 4 to 6 customer names, entering the names in "non-alphabetical" order. (Note: In order to practice receiving user-input and adding elements to your program, you will allow the user to add one customer to your array when your program runs. Thus your array only needs to be one item larger than the number of customers you pre-load. Obviously in a production program you would need to allow your customer list to grow, most likely using a database.)
For the Customer array, create a program to demonstrate the following tasks:
Prompt the user for a new customer name; add the name to the array (in an empty location).
Tell the user how many customer names are in the array. (See Note #1 in Programming Notes below.)
Sort the array alphabetically.
Print the sorted results.
Prompt the user for a customer name to sear
Comments
Leave a comment