Question: 1. Create an Multiple class with the following attributes and methods: a. Attributes: int[] data, int number b. Constructor: Index (int[] data, int number) This

 1. Create an Multiple class with the following attributes and methods:

1. Create an Multiple class with the following attributes and methods: a. Attributes: int[] data, int number b. Constructor: Index (int[] data, int number) This constructor should initialize both attributes. c. Method Checker (int number): This method needs to print all the values which has been stored in int array from 0t index to number t index. If any value up to number 1 index in array is equal to 0 or 5 , Method must return ZeroIsThereException or FiveIsThereException respectively. 2. Create a ZeroIs ThereException class: a. Default constructor. b. Parameterized constructor that takes a String that explains the exception. 3. Create a FiveIs ThereException class: a. Default constructor. b. Parameterized constructor that takes a String that explains the exception. 4. Create a Driver class to test your ZeroIsThereException \& FiveIsThereException class| functionalities: a. Create 3 different objects of Multiple class, where the first object has data ={1,2,5,4}, and number =3 the second object has data ={1,214,40,0} and number =2, and the third object has data =(1,2,3,12,74,56,89,75,0} and number =8. b. Call the Checker method on the above three different objects. c. Utilize both, Default and Parameterized constructors of FivelsThereException and ZeroIsThereException to handle the Exceptions. Submitting Your Work: Compress (zip) your java files into a new lab6_studentID.zip file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!