Coder Social home page Coder Social logo

weightliftingplateloading's Introduction

Olympic Lifting Weight Loader

Create's a program that generates a visual for the plates needed to load a given bar.

Considerations

  • Must have a toggle for mens bar and women's bar
  • Clips vs competition clips
  • Plates must be loaded properly
  • Program must work with all numbers from empty bar to current world record clean and jerk + 5 kg for men and women
  • Must follow competition loading rules for both competition and training
  • If a weight is above the men's and women's heavy weight world records, print "Are you sure you're not using pounds?"

The fundamental method must be:

string CalculateBarWeights(bool isWomensBar, bool isCompetition){
}

Representation

Item Weight Kg Representation
Women's Bar 15 -----
Men's Bar 20 =====
Competition Clips 2.5 C
Training Clips 0 c
White changeplate 0.5 w
Green changeplate 1 g
Yellow change plate 1.5 y
Blue change plate 2 b
Red Change plate 2.5 r
White 5 W
Green 10 G
Yellow 15 Y
Blue 20 B
Red 25 R

Solution tips and tricks

This solution comes with a basic test suite that checks a few weights. It is not complete. Feel free to add as many tests as you see fit.

Examples

100 mens, competition clips

CrGR=====RGrC

100 mens, training clips

cYR=====RYc

100 women's, competitionClips

CYR-----RYC

Program examples

Is this a mens bar?
y
Is this a competition?
y
What is the weight?
100

Your bar is:
CrGR=====RGrC
Is this a mens bar?
n
Is this a competition?
y
What is the weight?
100

Your bar is:
CYR-----RYC
Is this a mens bar?
n
Is this a competition?
y
What is the weight?
1000

"Are you sure you're not using pounds?"

weightliftingplateloading's People

Contributors

rakirs2 avatar

Stargazers

 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.