My solution to an elevator algorithm. Hello, my name is Andrej Szeles, and this is my entry regarding the bootcamp for Visma. I'm 22 years old, I'm from a small village south of Košice, called "Buzica". My hobbies are playing games, either video games on my PC or phone, but I like to play some board games with friends as well. I also watch youtube regularly, especially gameplay videos from foreign content creators, so I'm using English on a daily basis, not to mention, I also chat with my friends from different countries on Discord every day.
Now, onto the solution description. So at first I was worried I wouldn't be able to complete this task properly, because of how it was mentioned to create "an app", which is something I don't have a knowledge on how to do, but I decided to give it a try anyways, even though it runs only in the console. Also, just a little side note, I used Eclipse and programmed in Java. Now onto presenting my way of thinking. So, I wanted to make my program more interactive in asking the user themself how many floors should the elevator be able to visit. So at first I wanted to know, how many floors there should be ABOVE the ground floor and I asked whether there should be floors UNDERGROUND as well. And then I put both as a LinkedList with integer, and combined them into one "floors" variable. I tested it and it worked for me, the program made a list that had all the floors and they were all in the correct order. Afterwards, I made a new variable to remember what floor we are currently on, which at start is the ground floor. And afterwards, using multiple ifs, I made sure that the elevator behaves as if it's a real smart elevator, where it says what floor the user is on, the user gets an output as if moving to different floors one after another, and once on the wanted floor, it says so, and asks for another input. I made some adjustments as well, where once the elevator is on the ground floor again, it says "Welcome to ground floor" instead of "Welcome to floor 0", just to make it a tad bit more realistic. And then I needed a way to have the program running until the user inputs "stop", which will stop the program.
When it comes to the last step of "compilation and debugging", I use Eclipse, which runs my program AND has an option of debugging (which I haven't done, since my program is running as intented). I hope that's not gonna lose me points though.