Course Solutions Uncategorized (Solved) : Code Java Program Need Detailed Explanation Program Accomplished Sourcecode Runretailjava Q33140946 . . . .

(Solved) : Code Java Program Need Detailed Explanation Program Accomplished Sourcecode Runretailjava Q33140946 . . . .

 

Below is the code for a Java program. What is need is andetailed explanation of how the program was accomplished.

SOurceCode:

RunRetail.java

import java.util.logging.Level;
import java.util.logging.Logger;

public class RunRetail {
  
public static void main(String[] args){
  
RetailItem jacket = new RetailItem();
makeRetail(jacket, “Jacket”, 12, -59.95);
try {
jacket.verifyPrice(jacket.getPrice());
} catch (Exception ex) {
System.out.println(ex.getMessage());
}
try {
jacket.verifyUnits(jacket.getUnitsOnHand());
} catch (Exception ex) {
System.out.println(ex.getMessage());
}
  
RetailItem jeans = new RetailItem();
makeRetail(jeans, “Designer Jeans”, 40, 34.95);
try {
jeans.verifyPrice(jeans.getPrice());
} catch (Exception ex) {
System.out.println(ex.getMessage());
}
try {
jeans.verifyUnits(jeans.getUnitsOnHand());
} catch (Exception ex) {
System.out.println(ex.getMessage());
}
  
RetailItem shirt = new RetailItem();
makeRetail(shirt, “Shirt”, -20, 24.95);
try {
shirt.verifyPrice(shirt.getPrice());
} catch (Exception ex) {
System.out.println(ex.getMessage());
}
try {
shirt.verifyUnits(shirt.getUnitsOnHand());
} catch (Exception ex) {
System.out.println(ex.getMessage());
}

  
}
private static void makeRetail(RetailItem retail, Stringdescription, int
unitsOnHand, double price){
retail.setDescription(description);
retail.setUnitsOnHand(unitsOnHand);
retail.setPrice(price);
  
System.out.println(retail.getDescription() + ” “
+ retail.getUnitsOnHand() + ” ” + retail.getPrice());
}
}

RetailItem.java

public class RetailItem{
private

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : Q35571199 . . . .(Solved) : Q35571199 . . . .

<p><img alt="" src="https://media.cheggcdn.com/media%2F122%2F1223c5cc-7532-49ad-bf0f-d23eb72295cd%2FphpA6CldP.png" style="height:1024px;width:840px;"/><img alt="" src="https://media.cheggcdn.com/media%2F250%2F2508a369-78e7-40b1-b2d6-44f9a9a84809%2FphpybXQGb.png" style="height:1024px;width:814px;"/><img alt="" src="https://media.cheggcdn.com/media%2F083%2F083aca96-fd4e-4b68-b384-ce7ff69e912a%2FphpuXHIPv.png" style="height:176px;width:1024px;"/><img alt="" src="https://media.cheggcdn.com/media%2F33d%2F33d3cda1-2d3b-4bb3-9d31-5c9ea06c677a%2FphpmYZSp1.png" style="height:1024px;width:921px;"/>Please explain well ifpossible.</p>Show transcribed image text Expert Answer Answer to Please explain well if possible....