- 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:
- Robot works on battery and can walk for 5 km per charge.
- If remaining battery is less than 15%, a red light on Robot head should lit up indicating low battery.
Handling physical objects:
- Robot can carry any object not weighing more than 10 Kg.
- For every Kilogram carried by Robot, 2% extra [in addition to walking discharge] battery will be consumed.
- If the weight of the object is more than 10 Kg, Robot display [LED display on chest] will show message “Overweight”.
Scanning:
- Robot can scan any bar code and display it's price on Robot Display.
- 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:
- Display Message can be programmed as System.out.println.
- 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