Question 4 (20 Marks) Develop an algorithm for the following problem statement. Your solution should be a modularised ps
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Question 4 (20 Marks) Develop an algorithm for the following problem statement. Your solution should be a modularised ps
Question 4 (20 Marks) Develop an algorithm for the following problem statement. Your solution should be a modularised pseudocode with appropriate comments and a hierarchy chart. You should provide appropriate error messages. Warning: you are not expected to write in any programming-specific languages, but only in the generic structured form as stipulated in class for solutions design. A used car yard requires a program that reads in a file containing its monthly used car sales records and print a report showing the sales commission owing to the sales staff. Each record contains sales staff ID, name and the sales amount for the month. The commission rate varies according to sales volume, as follows: 17 10 5 Sales ($) Commission rate (%) 50,000.01 and above 10,000.01 to 50,000.00 15 5,000.01 to 10,000.00 0.00 to 5,000.00 The calculated commission is an accumulated amount according to the sales amount. For example, the commission owing for a sales amount of $51,250.00 would be calculated as follows: Commission = (51250-50000)*17% + (50000-10000)*15% + (10000-5000)*10% + (5000*5%) Your program will to print the salesperson's name, sales amount and the commission earned. And then, it proceeds to read in the next sales record. This is continue until all sales records are processed. And finally, it prints the total sales amount and the average sales amount for the month. Steps to undertake (required for submission) 1. Create a defining diagram of this problem. 2. Then, construct a hierarchy chart to identify the composition of your program. 3. Establish the main function, and 4. Develop the algorithm for each successive module outlined in your hierarchy chart, including your main module. 5. Your algorithm must be properly modularised to attract full mark.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!