Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rajmalpankaj786/prospecta_assignment

prospecta company Assignment
https://github.com/rajmalpankaj786/prospecta_assignment

maven resttemplate spring-boot

Last synced: 23 days ago
JSON representation

prospecta company Assignment

Awesome Lists containing this project

README

        

# prospecta_Assignment
## Assignment 1.

This project is a Spring Boot REST API implementation using the Fake Store API. It contains two tasks:

Task 1: Retrieve product details based on the category passed as an input parameter.

Task 2: Add a new product entry using a POST request.

Task 3: What are the key things you would consider when creating/consuming an API to ensure that it is secure and reliable?

API Endpoints

Task 1: List Products by Category

Endpoint: /products/category/jewelery

Method: GET

Description: Fetch a list of products based on the category passed as an input parameter.

Example Request:

GET http://localhost:8080/products/category/jewelery



Task 2: Add a New Product

Endpoint: /api/v1/products/add

Method: POST

Description: Add a new product to the Fake Store API.

Example Request:

POST http://localhost:8080/products/add



Task 3: adding new data in the database is not permanent, it's a temporary base so this is the challenge.


## Assignment 2:

# CSV Formula Evaluator



# Problem Description

This program processes a CSV file where some cells contain values, and others contain Excel-like formulas. The program reads the CSV, evaluates any formulas, and outputs a new CSV file with the calculated results.

Example Input

A B C

1 5 3 =5+A1

2 7 8 =A2+B2

3 9 =4+5 =C2+B3

Expected Output

After evaluation, the program should replace formulas with calculated values and produce a CSV like:

A B C

1 5 3 10

2 7 8 15

3 9 9 24



que 1: How will you tackle the challenge above?

Ans:

Steps for the Program Flow
View: reads the input CSV file.

Controller: passes the data to the Model.

Model: processes the data, evaluates formulas, and sends the result back to the View.

View writes the processed data into a new output CSV file.

que 2: What type of errors you would you check for?

Ans: Handle Errors: Handle undefined cells, invalid formulas, and circular references.