Git Product home page Git Product logo

jacobg122503 / elevatorx Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.28 MB

ElevatorX is a console application written in Java. It is essentially an elevator simulation. The user can pick how many floors they want their building to have. They can also chose how many elevators they want to have. All of the logic will still work, no matter how many floors/elevators you choose. See Readme for more information.

Java 100.00%
elevator-simulation elevator-simulator simulation

elevatorx's Introduction

ElevatorX

Created by Jacob Garcia

1.0.1

ElevatorX is a console application written in Java. It is essentially an elevator simulation. The user can pick how many floors they want their building to have. They can also chose how many elevators they want to have. All of the logic will still work, no matter how many floors/elevators you choose.

Getting Started

When you first start the program, you are shown the three questions below. You can have as many floors/elevators you want. Depending on what you have your screen zoom set to, having 50+ might not be the best choice. As for the last question, this is how many ticks you want to have per interval. An interval is when the simulation pauses and waits for user input to call elevators and send them where you want. If you are unsure of what you want your number of ticks to be, I reccomend putting the ticks to equal the amount of floors you have but it's your choice.

image

Intervals

Once you hit y, your building and elevators will be built. This screen is the screen you will see every time the simulation pauses at the end of an interval. At the bottom you can see it gives you some options on what you can do. 'c' calls an elevator, 'n' unpauses the simulation and continues to the next interval. and 's' stops the program.

image

Calling an elevator

When calling an elevator, you can decide what floor you want to call it to and which direction you want to send it after it arrives. After you are done creating the call, it will go back to showing your building. Your call has been sent, you can continue sending more calls are you can hit 'n' and continue to the next interval. When calling an elevator, you are unable to choose which elevator. This is on purpose because you can not choose in real life.

image

Arrived elevators

When an elevator arrives you can choose where to send it next, or you can simply ignore it and move on. You will be asked on each arriving elevator on where you would like to send it next.

image

Update Notes:

1.0.1 - 8/15/23 - Added tests and fixed small bug.

1.0.0 - 8/11/23 - Initial release

elevatorx's People

Contributors

jacobg122503 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.