How to make a code for elevator in JAVA? Is Java the most optimal language to do it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to make a code for elevator in JAVA? Is Java the most optimal language to do it?

Is it possible to make a code in Java which will simulate the behaviour of an elevator, for example, in a building with n levels and m passengers? Thanks!

24th Feb 2018, 10:35 AM
Sergiu Trigub
Sergiu Trigub - avatar
2 Answers
+ 3
It is certainly possible but it depends on what purpose it shall serve. I assume you’re aiming for a game in which the player can ride on an elevator. Then Java would be great since it is not restricted to a particular platform. If you’re targeting just one specific operating system (i.e. Windows) or you have a very complex code with tons of variables you can try c++ or c#. If you’re programming an actual elevator try c.
24th Feb 2018, 8:03 PM
Andreas Schenk
Andreas Schenk - avatar
+ 1
Thanks a lot for your answer. The idea with the elevator is more like a challenge from one of my friends. I am at the beginning of my way to become a programmer, so creating this program would be a good result for me! I will try to do it.
24th Feb 2018, 8:30 PM
Sergiu Trigub
Sergiu Trigub - avatar