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

  1. 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:
  2. if (clerkIndex == -1}.

Step by Step Solution

3.34 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To modify the Sales Clerks program as described you need to make the following changes Initialize th... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction To Programming With Java A Problem Solving Approach Questions!