Code Monkey home page Code Monkey logo

kuddle-task's Introduction

Kuddle-Task

Objectives

  1. Classes can be of multiple types - yoga, gym, dance.
  2. Each class has a capacity. This refers to the maximum number of users that can attend the class.
  3. Users can book a class if the capacity is not yet reached.
  4. If a class is already at capacity, the system should maintain a waiting list of interested users.
  5. Users can cancel the slot upto 30 mins before the class starts. When a user cancels their booking, allocate the canceled slot to the first user from the waitlist.

Description:

The app contains two files :

  • Book.java contains the bussiness logic of the app
  • Classes.java contains the main class for storing classes and their attributes like currentUsers, currentSlots, etc.

The Classes.java contains methods to check if user can cancel a class, join a class, check if a class is full, update the queue, etc.

Implementation

  • To add a class, input the class details like Name, totalSlots, etc.

  • To join a class, input your userName and the className you want to join.

  • If the class is full, the user is added to a queue and the error message and queue is displayed.

Note to recruiters:

  • I haven't made an extra class for User as we were allowed to use just names for the app functioning.
  • The code might feel less modular due to time constraint, otherwise I would have seperated the database operations from Book.java altogether.
  • I have used a simple array for storing the queue of users, could have used Queue data structure.

kuddle-task's People

Contributors

ishan-001 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.