Professional Documents
Culture Documents
Software Engineer - Java Test
Software Engineer - Java Test
From a given array of natural numbers, return the distance between the two closest numbers.
import java.util.*;
Section 2
Go to Spring Initializr (https://start.spring.io/) for your starter template. Add Spring Web MVC
and any required dependency.
User
1. Create a User object class which has a name, phone number, age, gender and
nationality.
2. Create a controller with a few REST Api as listed below:
○ Create user
○ Get all users
○ Get user by name/id
○ Update user
○ Delete user
Order
1. Create an Order object class which has an id, buyer (user), total and paid at.
2. Create a controller with a few REST Api as listed below:
○ Get all orders
○ Get order by id
○ Create order
○ Update order
○ Delete order
Extra
1. Make a REST Api to get orders by user
2. Make a REST Api to get total orders by user
You may test the API by using any HTTP client (preferably Postman)
How to submit:
Compress a folder with the Main.java file (Section 1) and the Java Spring Boot project (Section
2)