Answer:
public class Main
{
public static void main(String[] args) {
RetailItem ob1 = new RetailItem("Jacket", 12, 59.95);
RetailItem ob2 = new RetailItem("Designer Jeans", 40, 34.95);
RetailItem ob3 = new RetailItem("Shirt", 20, 24.95);
}
}
class RetailItem {
private String itemDescription;
private int units;
private double price;
public RetailItem(String itemDescription, int units, double price) {
this.itemDescription = itemDescription;
this.units = units;
this.price = price;
}
}
Explanation:
Create a class called RetailItem that has three variables itemDescription, units, and price
Initialize a constructor that takes three parameters to set the values
Inside the main, create three objects with given data