Question: 1.Write a Java program to find the common elements between two arrays (with string values). Call your source file: ArrayCommonElementFinder.java 2.In this problem we will

1.Write a Java program to find the common elements between two arrays (with string values). Call your source file: ArrayCommonElementFinder.java

2.In this problem we will create a user defined Java ArrayList holding car information for a dealer. Make sure you import the ArrayList class into your source file i.e.,

import java.util.ArrayList.

The class for students is defined as: class Car{ String make; String model; String year; double mileage; double price; }

Create an ArrayList with five car objects based on the class above.

Print out all the member variables of each of the individual cars after the list has been created. Make sure you use intuitive console messages to make this clear.

Call the primary source file CarArrayList.java

3.In the same program as 3, create a method that prints out the average price for a car of a 2 given make and model, given an array list of Cars of arbitrary size as an input argument. Also create methods that print out the details of the Cars with the highest and the lowest prices in this array list. Demonstrate this works for your five member car array list created in 3.

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!