Skip to content

Instantly share code, notes, and snippets.

@BrianZanti
Last active February 11, 2021 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrianZanti/1085f55b2eda2dc762816a7cb7f75594 to your computer and use it in GitHub Desktop.
Save BrianZanti/1085f55b2eda2dc762816a7cb7f75594 to your computer and use it in GitHub Desktop.

Overview

We will be creating an application to track Professors and Students at the Hogwarts School of Witchcraft and Wizardry from the Harry Potter book series (you do not need any knowledge of Harry Potter to complete this challenge).

  • Professors have a name, age, and specialty
  • Students have a name and age
  • Professors have many students
  • Students have many professors

User Stories

User Story 1

As a visitor,
When I visit a professor show page,
Then I see that professor's name, age, and specialty (e.g. "Name: Minerva McGonagall, Age: 204, Specialty: Transfiguration")
And I see the names of all students associated with this professor
User Story 2

As a visitor,
When I visit a professor show page,
Then I see the average age of all students associated with this professor
User Story 3

As a visitor,
When I visit the professor index,
I see the name of each professor,
And next to each professor I see a link to "Update"
When I click this link,
Then I am taken to a form where I can input a new name, age, and specialty
When I click the submit button,
Then I am taken back to the professors index where I see that professor has been updated

Extension

User Story Extension

As a visitor
When I visit the professor show page
Next to each students name I see a button "Unenroll"
When I click this button
Then I am taken back to the professor's show page
And I no longer see the student listed

(Note: You should not delete the student record entirely)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment