1) Implement add(index, value): you will need to shift elements in the array before adding in the new element, as well a

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

1) Implement add(index, value): you will need to shift elements in the array before adding in the new element, as well a

Post by answerhappygod »

1) Implement add(index, value): you will need to shift elementsin the array before adding in the new element, as well as increasethe tracked size.
2) Implement remove(index): you will need to shift elements inthe array to "remove" data, as well as decrease the trackedsize.
3)Throw Exceptions as applicable for both methods.
4)Expand your Main class to prove to yourself that all methodimplementations work appropriately.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply