Giter VIP home page Giter VIP logo

benze-test's Introduction

Getting Started

Autonomous electric vehicles - PROBLEM STATEMENT

Design and implement a microservice for an autonomous electric vehicle system with the following features:

Check if the vehicle can reach the destination without charging
Find charging stations - If the destination can not be reached with current charging level. 
Appropriate handling to be done if the destination cannot be reached even with charging

Build tool

Apache Maven

Language

Java 1.8

Steps:

1. On the command line

		git clone https://github.com/spring-projects/spring-petclinic.git

	2. Inside Eclipse or STS

		File -> Import -> Maven -> Existing Maven project

	 Then either build on the command line ./mvnw generate-resources or 
	 using the Eclipse launcher (right click on project and Run As -> Maven install) to generate the css. 
	 Run the application main method in class com.benze.assignment.BenzeTestApplication.java
	 by right clicking on it and choosing Run As -> Java Application

Frameworks

Spring Boot
Spring web

Service API

API	:	http://localhost:8080/check_charge_stations

Request	: 	{ "vin": "W1K2062161F0017", "source": "Home", "destination": "zoo" }

Response :	
		{
		    "transactionId": "1633763109814",
		    "vin": "W1K2062161F0017",
		    "source": "Home",
		    "destination": "zoo",
		    "distance": 140,
		    "currentChargeLevel": 39,
		    "chargingStations": [
			"S1",
			"S2"
		    ],
		    "errors": [],
		    "chargingRequired": true
		}

image

API	:	http://localhost:8080/check_charge_stations

Request	: 	{ "vin": "W1K2062161F0080", "source": "Home", "destination": "Airport" }

Response :	
		{
		    "transactionId": "1633764134029",
		    "vin": "W1K2062161F0080",
		    "source": "Home",
		    "destination": "Airport",
		    "distance": 60,
		    "currentChargeLevel": 2,
		    "chargingStations": [],
		    "errors": [
			{
			    "id": 8888,
			    "description": "Unable to reach the destination with the current fuel level"
			}
		    ],
		    "chargingRequired": true
		}

image

benze-test's People

Contributors

sandeepbs2016 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.