| Summary: | Added products are not shown | ||
|---|---|---|---|
| Product: | Group 4 | Reporter: | kykao2-c |
| Component: | Main | Assignee: | aaronlii2-c |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | chlam286-c, kykao2-c, plchan83-c, sharitsang97 |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS | ||
| Deadline: | 2020-11-06 | ||
| Attachments: | Added products not shown | ||
I have found that the addProduct function does not add the product to the product database. This has been fixed, and the expected output works now. - Aaron |
Created attachment 61 [details] Added products not shown After I have added the product to the database, the queryProduct and listProduct command show there is no product in the database. Device specification: MacOS: Mojave version 10.14.6 [Device: Macbook Pro 2017, 13-inch] Severity: Major. Step to reproduce the bug: input: 1. "addProduct productID_1 appleJuice 20.99 200" output: "Product appleJuice (PID: productID_1) has been added." input: 2. "queryProduct productID_1" output: "Product not found." input: 3. "listProduct" output: "No product record." Observation: There is a wrong implementation on either "addProduct" command or both "queryProduct" and "listProduct" command. Expectation: The program returns the information of the added product(s). Expected Output: input: 1. "addProduct productID_1 appleJuice 20.99 200" output: "Product appleJuice (PID: productID_1) has been added." input: 2. "queryProduct productID_1" output: PID Name Price Stock productID_1 appleJuice 20.99 200 input: 3. "listProduct" output: PID Name Price Stock productID_1 appleJuice 20.99 200 Solution: There are two possibilities - either the addProduct function is implemented incorrectly or the queryProduct and listProduct do not produce the result correctly. The first one implies the product has not been added to the database but it returns a wrong message. This should be further inspected.