IanTDuncan / MealTime

Project for CSC 480
0 stars 0 forks source link

API - Edmamam Shopping List - ShoppingSearchResult Class #117

Closed BeepDroid closed 4 months ago

BeepDroid commented 4 months ago

API - Edmamam Shopping List - ShoppingSearchResult Class


Description:


The ShoppingSearchResult class serves as a data model to represent individual search results obtained from an API. In the context of the provided code examples, the class is designed to encapsulate information about items in search results, such as their names and prices.

Steps to Reproduce:


  1. Decide on the properties you're going to need for this class.
  2. Create the ShoppingSearchResult java class in the same folder as the rest of our classes as our handler class is going to be referencing it.
  3. Definte the class and properties, code snippet example will be provided.

Expected vs. Actual Behavior:


Expected: Capture and encapsulate the data pulled from our API call.

Actual: Having some trouble with the API logic.

Code Snippets:


`private String itemName; private double itemPrice; private int servings;

    //Will add more properties as needed

    public ShoppingSearchResult(String itemName, double itemPrice) {
        this.itemName = itemName;
        this.itemPrice = itemPrice;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public double getItemPrice() {
        return itemPrice;
    }

    public void setItemPrice(double itemPrice) {
        this.itemPrice = itemPrice;
    }

    public int getServings(){
        return servings;
    }

    public void setServings(int servings){
        this.servings = servings;
    }`

Environment Details:


Android Studio compiler, Windows OS.

Current Status:


In progress

aaleksandraristic commented 4 months ago

Hey Kerry, I see that you are working on this issue. Could you please just update the due date in the roadmap for it? Put the date that you expect to finish it.