Question: Modify the SalesClerks program so the SalesClerk array length always equals the current number of sales clerks. That means the initial length of the SalesClerks
- Modify the SalesClerks program so the SalesClerk array length always equals the current number of sales clerks. That means the initial length of the SalesClerks array should be zero. Because the current number of sales clerks always equals clerks.length, dispense with the filledElements variable. Also dispense with the doubleLength method, and do the job of incrementing the length of the clerks array in the addSale method, mostly within the block under:
- if (clerkIndex == -1}.
Step by Step Solution
3.34 Rating (163 Votes )
There are 3 Steps involved in it
To modify the Sales Clerks program as described you need to make the following changes Initialize th... View full answer
Get step-by-step solutions from verified subject matter experts
