GithubHelp home page GithubHelp logo

fizz-buzz's Introduction

The application:

  • Should be an MVC 4.0 or 5.0 project
  • Should be correctly architected, as if this was a production application
  • Should built using a 'test first’ methodology
  • It is not important that you complete every step in the exercise
  • It is important that all submitted code is of good quality. Refactor as necessary.

You have 2 hours to complete the exercise

You must check in your code to Bitbucket every 10 minutes, without fail

Also, check in your code after every step, and label it ‘Step 1’, ‘Step 2’ etc.

DO NOT share, print or distribute this exercise to any other person.

1- Basic Fizz-Buzz:

a - The user should be able to enter a positive integer
b -  You should print out, in a vertical list, all of the values between 1 and the entered value
c - Where the number is divisible by 3, you should instead print ‘fizz’
d - Where the number is divisible by 5, you should instead print 'buzz'
e - Where the number is divisible by 3 AND 5, you should instead print ‘fizz buzz’

2 -Add validation to ensure the entered value is an integer between 1 and 1000

  • ADDED AS DATA ANNOTATION ALSO EXCEPTION INSIDE METHOD AND TESTED BY UNIT TESTING)

3- Add styling so 'fizz' is printed in blue, and 'buzz' in green

  • ASSUMED THAT FIZZBUZZ SHOULD DISPLAY FIZZ HALF IN BLUE AND BUZZ HALF IN GREEN

4 - Change the logic so that if today is Wednesday, the words 'wizz' and ‘wuzz' are substituted for 'fizz' and 'buzz

  • Decided to do simple injection of DateTime.Now as a func instead of complicating with a time class that you can mock later as I dont think is needed for this simple project. Unit testing could be done better to avoid repetition

5 - Amend the program so only 20 values are displayed at a time. Implement ‘Next’ and ‘Previous’ buttons to display the remaining values.

  • Used PagedList.MVC to implement this functionality

6 - A RESTful web service is required to record the user entered values.Design and document this web service. Implement it as a mock or stub in your code.

  • DID NOT HAVE TIME TO IMPLEMENT THIS STEP

fizz-buzz's People

Contributors

dcarles avatar dependabot[bot] avatar

Stargazers

Roman avatar Ali Rasoulian 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.