samedi 2 mars 2019

Design a robot application [on hold]

  • ROBOT APPLICATION

OBJECTIVE

  • Extensible – easily adaptable to future enhancements
  • Highly cohesive and loosely coupled
  • Good use of OOPS concepts
  • Make use of design pattern wherever possible
  • Code should be clean. Avoid code smells.
  • Can easily be unit tested. If possible, write unit tests

PROBLEM STATEMENT Time Duration: A company working in artificial intelligence domain is planning to create a Robot. But before they do heavy investment in Robot research and development, they requested their technical team to do a small prototype and create a Robot with some basic features.

Technical team decided to introduce following features in the Robot prototype:

Power Operated:

  1. Robot works on battery and can walk for 5 km per charge.
  2. If remaining battery is less than 15%, a red light on Robot head should lit up indicating low battery.

Handling physical objects:

  1. Robot can carry any object not weighing more than 10 Kg.
  2. For every Kilogram carried by Robot, 2% extra [in addition to walking discharge] battery will be consumed.
  3. If the weight of the object is more than 10 Kg, Robot display [LED display on chest] will show message “Overweight”.

Scanning:

  1. Robot can scan any bar code and display it's price on Robot Display.
  2. In case bar code is not clear enough for scanning, Robot display will show “Scan Failure”.

Technical team handed over these details to IT team to build a software for Robot.

Please help me to design and create a Robot application in Java for automating all the features listed above.

Following are acceptable assumptions:

  1. Display Message can be programmed as System.out.println.
  2. There is no need for creating bar code scanning functionality. We can assume that we already have an api which does that for us.

Aucun commentaire:

Enregistrer un commentaire