Coder Social home page Coder Social logo

movie-scheduler's Introduction

Movie Scheduler

A program to help movie theaters optimally schedule movies.

Prerequisites

In order to run this program, make sure you have ruby installed.

Usage

In order to run the program, cd into the root directory and run the following command in the terminal:

ruby lib/movie_scheduler.rb path/to/filename.txt

Design Decisions

The biggest design decision I made was to create a ScheduleTime class that represented time without a date. Managing an entire DateTime object for each schedule would have created a lot of work to simple not use the date part of the class. With ScheduleTime, time is represented abstractly instead of an actual time. The class still allows for necessary operations, like adding and subtracting minutes and comparing times.

A Movie instance represents all the data for each movie, and is responsible for calculating its start and end time, given a last possible end time.

A Theater instance represents the schedule, turnover time, and setup time for each theater.

A MovieScheduler instance handles creating an optimized schedule for each movie, and input and output.

movie-scheduler's People

Contributors

polyfish42 avatar

Watchers

James Cloos avatar  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.