Need help on how write this program.

"The Eversoft Eraser Company has a list of its customers’ names (not necessarily in alphabetical order) and telephone numbers in a file named "customer" with records of the following form:
last_name (String), first_name (String), phone_number (String)
a. Allow the user to input a last name, then search the file and display all names and phone numbers corresponding to that last name.
b. Load the file into parallel arrays and display the list of customers’ names and phone numbers in alphabetical order."

Write a C program that reads the first names of up to 10 salesmen

To write this program, you will need to use a programming language of your choice. I'll provide an explanation of the steps involved in both parts of the program. Here's how you can approach it:

Part a: Searching for a last name in the file and displaying corresponding names and phone numbers:
1. Open the "customer" file to read its contents.
2. Prompt the user to input a last name.
3. Read each line of the file and check if the last name in the line matches the user-inputted last name.
4. If a match is found, display the corresponding first name and phone number.
5. Repeat step 3 and 4 for each line until the end of the file is reached.
6. Close the file.

Part b: Loading the file into parallel arrays and displaying customers' names and phone numbers in alphabetical order:
1. Open the "customer" file to read its contents.
2. Read each line of the file and split them into last name, first name, and phone number.
3. Store the last name, first name, and phone number into three separate arrays.
4. Sort the last name array in alphabetical order, while keeping the corresponding entries in the first name and phone number arrays linked to their respective last names.
5. Display the sorted list of customers' last names, first names, and phone numbers.

Here's a basic code example in Python to help you get started with implementing both parts:

```python
# Part a: Searching for a last name in the file
def search_customer():
last_name = input("Enter a last name to search for: ")
with open("customer.txt", "r") as file:
for line in file:
record = line.strip().split(", ")
if record[0] == last_name:
print("First name:", record[1])
print("Phone number:", record[2])

# Part b: Loading the file into parallel arrays and displaying them in alphabetical order
def load_and_display():
last_names = []
first_names = []
phone_numbers = []
with open("customer.txt", "r") as file:
for line in file:
record = line.strip().split(", ")
last_names.append(record[0])
first_names.append(record[1])
phone_numbers.append(record[2])

sorted_indices = sorted(range(len(last_names)), key=lambda k: last_names[k])
for i in sorted_indices:
print("Last name:", last_names[i])
print("First name:", first_names[i])
print("Phone number:", phone_numbers[i])

# Main program
choice = input("Enter 1 to search for a last name, 2 to load and display the list: ")
if choice == "1":
search_customer()
elif choice == "2":
load_and_display()
else:
print("Invalid choice!")
```

In this example, the "customer" file is assumed to be a plain text file with each record on a separate line, separated by commas. You can replace "customer.txt" with the actual file name.

Remember to adjust the code according to the programming language you choose and check if there are any language-specific file input/output operations that need to be used.