Skip to content

Instantly share code, notes, and snippets.

@alandoonan
alandoonan / CA 2 MAIN.py
Created May 1, 2016 18:45
ELEVATOR WORKING FINAL 01/05/16 19:45
'''
Simple Elevator Simulator
This is my main project for Programming and Algorithms Semester 2 as outlined next . Your task is to implement the simple elevator in Python using classes.
The default strategy is the simple "start at the bottom, go to the top, then go to the bottom". Can you write a better strategy, one that is more efficient?
Project Description / Specification
Create three classes: Building, Elevator, and Customer.
Equip the building with an elevator. Ask user to customize the number of floors and the number of customers.
@alandoonan
alandoonan / CA 2 MAIN.py
Created May 1, 2016 18:14
ELEVATOR WORKING 01/05/16 19:14
'''
Simple Elevator Simulator
This is my main project for Programming and Algorithms Semester 2 as outlined next . Your task is to implement the simple elevator in Python using classes.
The default strategy is the simple "start at the bottom, go to the top, then go to the bottom". Can you write a better strategy, one that is more efficient?
Project Description / Specification
Create three classes: Building, Elevator, and Customer.
Equip the building with an elevator. Ask user to customize the number of floors and the number of customers.
@alandoonan
alandoonan / CA 2 MAIN.py
Last active April 28, 2016 21:24
ELEVATOR COMPARISON WORKING 22:24 28/04/16
'''
Simple Elevator Simulator
This is my main project for Programming and Algorithms Semester 2 as outlined next . Your task is to implement the simple elevator in Python using classes.
The default strategy is the simple "start at the bottom, go to the top, then go to the bottom". Can you write a better strategy, one that is more efficient?
Project Description / Specification
Create three classes: Building, Elevator, and Customer.
Equip the building with an elevator. Ask user to customize the number of floors and the number of customers.
@alandoonan
alandoonan / CA 2 MAIN.py
Created April 28, 2016 13:00
ELEVATOR HUMAN TIME WORKING 28/04/16 14:00
'''
Simple Elevator Simulator
This is my main project for Programming and Algorithms Semester 2 as outlined next . Your task is to implement the simple elevator in Python using classes.
The default strategy is the simple "start at the bottom, go to the top, then go to the bottom". Can you write a better strategy, one that is more efficient?
Project Description / Specification
Create three classes: Building, Elevator, and Customer.
Equip the building with an elevator. Ask user to customize the number of floors and the number of customers.
@alandoonan
alandoonan / CA 2 MAIN.py
Created April 28, 2016 09:09
ELEVATOR COMPARISON WORKING 28/04/16 10:09
'''
Simple Elevator Simulator
This is my main project for Programming and Algorithms Semester 2 as outlined next . Your task is to implement the simple elevator in Python using classes.
The default strategy is the simple "start at the bottom, go to the top, then go to the bottom". Can you write a better strategy, one that is more efficient?
Project Description / Specification
Create three classes: Building, Elevator, and Customer.
Equip the building with an elevator. Ask user to customize the number of floors and the number of customers.
@alandoonan
alandoonan / CA 2 MAIN.py
Created April 27, 2016 22:32
ELEVATOR WORKING DOUBLE RUN 27/04/16 23:32
'''
Simple Elevator Simulator
This is my main project for Programming and Algorithms Semester 2 as outlined next . Your task is to implement the simple elevator in Python using classes.
The default strategy is the simple "start at the bottom, go to the top, then go to the bottom". Can you write a better strategy, one that is more efficient?
Project Description / Specification
Create three classes: Building, Elevator, and Customer.
Equip the building with an elevator. Ask user to customize the number of floors and the number of customers.
@alandoonan
alandoonan / CA 2 MAIN.py
Last active April 27, 2016 19:43
ELEVATOR WORKING 27/04/16 20:43
'''
Simple Elevator Simulator
This is my main project for Programming and Algorithms Semester 2 as outlined next . Your task is to implement the simple elevator in Python using classes.
The default strategy is the simple "start at the bottom, go to the top, then go to the bottom". Can you write a better strategy, one that is more efficient?
Project Description / Specification
Create three classes: Building, Elevator, and Customer.
Equip the building with an elevator. Ask user to customize the number of floors and the number of customers.
@alandoonan
alandoonan / CA 2 MAIN.py
Created April 26, 2016 22:19
ELEVATOR WORKING 26/04/16 23:18
author = 'Alan Doonan'
import random
import time
import tkinter
class Building: # defines class building
number_of_floors = 0 # sets number_of_floors variable to 0
@alandoonan
alandoonan / CA 2 MAIN.py
Created April 24, 2016 18:34
ELEVATOR WORKING 24/04/16 19:35
author = 'Alan Doonan'
import random
import time
class Building: # defines class building
number_of_floors = 0 # sets number_of_floors variable to 0
customer_list = [] # creates an empty list for customers in building
waiting_list = [] # creates an empty list for customers waiting on elevator
finished_list = [] # creates an empty list for customers finished with the elevator and who have reached their destinatio
@alandoonan
alandoonan / CA 2 MAIN.py
Created April 24, 2016 16:50
ELEVATOR WORKING 24/04/16 17:50
author = 'Alan Doonan'
import random
import time
class Building: # defines class building
number_of_floors = 0 # sets number_of_floors variable to 0
customer_list = [] # creates an empty list for customers in building
waiting_list = [] # creates an empty list for customers waiting on elevator