Reference no: EM132430665
Problem: Given the below program skeleton. Replace the <insert code here> items with appropriate code so that the program produces the output shown below. Try to mimic the output's format precisely.
public class CarInventoryReport
{
public static void main(String[] args)
{
final String HEADING_FMT_STR = <insert code here>;
final String DATA_FMT_STR = <insert code here>;
String item1 = "Ford Fusion";
double price1 = 23215;
int qty1 = 14;
String item2 = "Honda Accord";
double price2 = 24570;
int qty2 = 26;
System.out.printf(HEADING_FMT_STR,
"Item", "Price", "Inventory");
System.out.printf(HEADING_FMT_STR,
"----", "-----", "---------");
System.out.printf(DATA_FMT_STR, item1, price1, qty1);
System.out.printf(DATA_FMT_STR, item2, price2, qty2);
} // end main
// end class CarInventoryReport
Output
Item Price Inventory
Ford Fusion 23,215.00 14
Honda Accord 24,570.00 26