Question: Question 1: Create a new project in Eclipse (File > New > Java Project.) Name it Homework2Q1 Create a package for your classes Create an
Question 1: Create a new project in Eclipse (File > New > Java Project.) Name it Homework2Q1 Create a package for your classes Create an abstract superclass with only non default constructor(s) Create two different subclasses of that superclass Create another class that is not related (you need a total of four classes up to this point) Create an interface Make the class you did in step 5 and one of the subclasses you did in Step 4 implement the interface Create a runner that: a. Creates an array of the abstract superclass. Make the array elements a mix of the two subclasses b. Create another array of the interface. Make the array elements a mix of the two classes that 1/3 implement it. C. For both arrays, make a for loop that will count how many objects of each type are within. So for example, if an array of Fruits has only Oranges and Apples, your program should count how many apples and oranges are in this array d. Do the same for the second array Be Creative! Avoid classes such as Soccer Match, BankAccount, Fruits and Oranges. 9
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
