Giter VIP home page Giter VIP logo

grade-school's Introduction

Grade School

Grade School is a small archiving program that stores students' names along with the grade that they are in.

The current features are:

  • Adding a student's name to the roster for a grade
    • "Add Jim to grade 2."
    • "OK."
  • Getting a list of all students enrolled in a grade
    • "Which students are in grade 2?"
    • "We've only got Jim just now."
  • Getting a sorted list of all students in all grades. Grades should sort as 1, 2, 3, etc., and students within a grade should be sorted alphabetically by name.
    • "Who all is enrolled in school right now?"
    • "Grade 1: Anna, Barb, and Charlie. Grade 2: Alex, Peter, and Zoe. Grade 3..."

Note that all our students only have one name. (It's a small town, what do you want?)

Currently, the test suite does not pass. Your first task is to get the existing test suite passing by adjusting the School class.

Once the test suite is passing, add the following features (with corresponding tests):

  • Removing a student from the school
    • "Remove Jim in grade 2."
    • Assume that the students have unique names per grade.
  • Graduating the students to the next grade
    • "Graduate the students."
    • Assume that grade 8 is the highest grade, and after grade 8 they are no longer in the school.
  • Limiting the number of students per grade to 20
    • When adding students, if there

Once you are done, create a GitHub Gist with the Ruby files for the School class and the test file and share it via email.


For running the tests provided, you will need the Minitest gem. Open a terminal window and run the following command to install minitest:

gem install minitest

In order to run the test, you can run the test file from the exercise directory. For example, if the test suite is called hello_world_test.rb, you can run the following command:

ruby grade_school_test.rb

grade-school's People

Watchers

 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.