Build a webshop that people can use to order some merchandise from the Greenfox store.
- the frontend should have
- a heading with the title of the site
- dropdown list with all unique name options
- dropdown list with all unique size options
- input field to set the quantity of clothes
- a GET TOTAL button which redirects to the
Summary
page - list the clothing items of the database in table
- when GET TOTAL button is submitted the backend should
- summarize the total price based on the quantity that was given in the inputfield and send these information to the
Summary
page
- summarize the total price based on the quantity that was given in the inputfield and send these information to the
- you should create these endpoints:
- the endpoint should render an HTML displaying the full list of clothes(explained above)
- this endpoint should receive all the information of the selected item
- this endpoint should render an other HTML after receiving the data, which should display the extract of the selected item in a table:
- item name
- manufacturer
- category
- size
- amount
- sub-total price of the item (based on nr. of selected item)
- this endpoint should return all the clothes which has higher/lower/equal price than the given parameter
Example query:
http://localhost:8080/warehouse/query?price=50&type=lower
- this should return a json with every cloth where the unit price is lower than 50
{
"result": "ok",
"clothes":
[
{
"id": "21",
"item_name": "Strecth Steamed Pencil Skirt",
"manufacturer": "Calvin Klein",
"category": "skirts",
"size": "s",
"unit_price": 39.0,
},
{
"id": "24",
"item_name": "Strecth Steamed Pencil Skirt",
"manufacturer": "Calvin Klein",
"category": "skirts",
"size": "m",
"unit_price": 39.0,
},
]
}
- the frontend should have:
- a heading with the title of the page
- a link back to the main page
- the list of selected items with the properties defined above
- create 2 endpoint tests all together, you can choose on which endpoint/endpoints
Why would you declare your class as an abstract class If I want to share code among several closely related classes. If I expect that classes that extend abstract class have many common methods or fields or require access modifiers other than public (such as protected and private). If I want to declare non-static or non-final fields. This enables to define methods that can access and modify the state of the object to which they belong. By using abstract classes, you can inherit the implementation of other (non-abstract) methods. You can't do that with interfaces - an interface cannot provide any method implementations.