Sha256: 1a7596f17653a2a9c35ea58e92ce42f2009bdc546ad7a68d5dec87c87d43d5f3

Contents?: true

Size: 1.57 KB

Versions: 183

Compression:

Stored size: 1.57 KB

Contents

# Robot Name

Manage robot factory settings.

When robots come off the factory floor, they have no name.

The first time you boot them up, a random name is generated in the format
of two uppercase letters followed by three digits, such as RX837 or BC811.

Every once in a while we need to reset a robot to its factory settings,
which means that their name gets wiped. The next time you ask, it will
respond with a new random name.

The names must be random: they should not follow a predictable sequence.
Random names means a risk of collisions. Your solution must ensure that
every existing robot has a unique name.

## Hints
Make sure your solution is general enough to be easily scalable for longer names containing more letters and digits. This usually makes for better code quality, too.

Suggestion (this is not explicitly tested):
To make sure you always have a unique name you could implement your own cache or use a `Stream` with its built-in cache.


The Scala exercises assume an SBT project scheme. The exercise solution source
should be placed within the exercise directory/src/main/scala. The exercise
unit tests can be found within the exercise directory/src/test/scala.

To run the tests simply run the command `sbt test` in the exercise directory.

For more detailed info about the Scala track see the [help
page](http://exercism.io/languages/scala).


## Source

A debugging session with Paul Blackwell at gSchool. [http://gschool.it](http://gschool.it)

## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

Version data entries

183 entries across 183 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.179 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.178 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.177 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.176 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.175 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.174 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.173 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.172 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.171 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.170 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.169 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.167 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.166 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.165 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.164 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.163 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.162 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.161 tracks/scala/exercises/robot-name/README.md
trackler-2.2.1.160 tracks/scala/exercises/robot-name/README.md