Question: Code in java: Create a Class call it Student, student has an integer ID , write a constructor, set and get methods. Declare an array
Code in java: Create a Class call it Student, student has an integer ID write a constructor, set and get methods. Declare an array of size
of type Student, we need to fill the array with student objects such that if the id of the student is even the object will be stored at an even index inside
the array, otherwise it will be stored at an odd index. Declare a public method call it storeStudent as a member of the StudentTest class, the method
will use exception handling to prevent violating the rules stated above. Fill the array with students using storeStudent method. Print out the
contents of the array after inserting the students inside the array.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
