Answer to Question #244498 in Java | JSP | JSF for ssmi

Question #244498

 Make an application with the above classes for a client that comes with a list of items * that needs to purchase with the following ruleset: - At the beginning at least 5 different types of items must be added to the storage (use the method addItemQuantity() from Storage.class) - Then create a list of items of the client. - For every item first should be checked if the items are available (use getItemQuantity of Storage.class) - If an item is unavailable do not include it in the invoice - If the item is available include it in the invoice - After all the items are added to the invoice, show all the items added with the description, quantity and cost of the item. This final list should be shown ordered in alphabetical order. - output the invoice into a text file (invoice.text) and save it on the local PC.


1
Expert's answer
2021-09-30T06:42:27-0400
public class Storage {
  private final List<String> listQuantities;
  public Storage() {
    this.listQuantities = new ArrayList<String>();
  }
  public bool addItemQuantity(String quantity) {
    this.listQuantities.add(quantity);
  }
  public List<String> getItemQuantity() {
    return this.listQuantities;
  }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS