1. Write a generic Bag class using an array to store any objects. Test the Bag class with a Demo class to store, find, delete, and display objects of Integers and String, respectively.
Code in java, please 1. Write a generic Bag class using an array to store any objects. Test the Bag class with a Demo class to store, find, delete, and display objects of Integers and String, respectively. 2. Write another class called Student, which contains name (String), id (String), and gpa (double) fields. Modify the generic Bag class from the previous problem to store five students with automatically generated id numbers. You will then find, delete, and display any student by his/her id number. 3. Write another class called Faculty, which contains name, id, and salary fields. Modify the generic Bag class from the previous problems, if necessary, to store five faculty and five students, and then find, delete, and display either faculty or student by id number. All id numbers should be automatically generated and there should have no duplicated id values between Students and Faculty.
Expert Answer
OR