Asked by reggie
Create a flowchart for a program that will sort the top 1,000 customers by their annual purchase amount and print the names and addresses of the top 100 customers, or fewer if there aren’t 100 customers.
Answers
Answered by
MathMate
Here's a possible pseudocode:
1. Input customer data (from disk or otherwise) to an array of objects or structures, each containing:
- name
- address
- purchase
The size of the array is n, and the array name is Clients.
2. Sort the array in decreasing order of purchase amount. Details can be expanded once the data structure and sort algorithm are determined.
3. Print/output the names, addresses, and purchase amounts from each client. The upper limit 100 will be replaced by n if n<100.
Build on the above and suggest a more detailed pseudocode. We'll be happy to critique your work.
1. Input customer data (from disk or otherwise) to an array of objects or structures, each containing:
- name
- address
- purchase
The size of the array is n, and the array name is Clients.
2. Sort the array in decreasing order of purchase amount. Details can be expanded once the data structure and sort algorithm are determined.
3. Print/output the names, addresses, and purchase amounts from each client. The upper limit 100 will be replaced by n if n<100.
Build on the above and suggest a more detailed pseudocode. We'll be happy to critique your work.
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.