Lab 8
Programming Lab:
• Create a package named lab8 (no spaces, ALL in lowercase) where you will place your lab files.
• Write a class ListManager with the following methods:
? a constructor that accepts an ArrayList of integers as parameter.
? countPositives that returns the count of integers greater than 0.
? countNegatives that returns the count of integers less than 0.
? sortAndRemoveDuplicates that returns a new list with the elements of the original list rearranged and sorted into ascending order, as well as
removing all duplicate values. For example, if the original list contains [7, 4, -9, 4, 15, -5, 8, 27, 7, 32, 11, 32, -5, 32, -9, 27, -9] the new list will
contain[-9, -5, 4, 7, 8, 11, 15, 27, 32].
• Write an app ListManagerApp that will create and object of ListManager, invoke all its methods and display the results to the user.
• Add a comment at the beginning of each file indicating your name, course, and section (e.g. //John Doe, CET 3640-OL123)