You can utilize any classes from the Java API as you see fit. Remember you can reference the…
You can utilize any classes from the Java API as you see fit. Remember you can reference the Javadocs on the
Q: drive. Write a Java program that:
1. Has an application class named L4XXxx (see below), that has no explicit superclass but does have a main () method.
2. Performs the following tasks (with appropriate screen output):
a. Creates generic ArrayList<> instances whose component data is Integer, Double, String, and Weiss Shape (one list of each type.)
b. Add at least 10 random items (random Strings can be fun – make sure they’re at least 8 chars long) to each ArrayList. c. Display the contents of each list after all of the items have been inserted. Make the parameter of the display method a generic ArrayList of any type of data.
i. The method should display each item (per its toString()) one on each line
ii. Create headers for all output (in main() or a custom header method, not this method) clearly labeling which output it is. Use a sensible amount white space to separate different reports from each other vertically.
1) public abstract class Shape
2) {
3 )public abstract double area();
4)public abstract double perimeter();
5)
6) public double semiperimeter( )
7) { return perimeter() / 2; }
8) }
1) public class Shape
2) {
3)public double area()
4){
5) return -1;
6)}
7) }