Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Language - JAVA an ArrayList of integers. 1. (0.5 point) Define a class called ArrayTest containing one 'data field: 2. (l point) create two constructor
Language - JAVA
an ArrayList of integers. 1. (0.5 point) Define a class called ArrayTest containing one 'data field: 2. (l point) create two constructor methods, one accessortigetter) method and one mutatorsetter) method for the ArrayTest class. (0.5 point) Implement a pickMin method to pick the smallest number from the ArrayList. (0.25 point) Implement a pickSecondMin method to pick the second smallest number from the ArrayList. For example pickSecondMin from the list( 10, 9, 8, 12, 14,-1, returns 8. 3. 4. 5. (0.25 points) Implement a reverse() method to reverse the elements in the ArrayList. 6. (0.5 point, bonus) Implement a checkPathenthesis(String exp) method to check if a string has matching pairs of parenthesis. For example, checkPathenthesis("(") should return false and checkPathenthesis("(0)") returns true Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started