CSE 3901 ACTUAL EXAM 2026 QUESTIONS
WITH SOLUTIONS GRADED A+
◉ http://web.cse.ohio-state.edu/~giles/3901/lectures/lecture16.pdf slide
4. Answer: Draw an example of MVC
◉ It is generated! (tool called rake)
Golden rule: Never edit schema.rb directly
Instead, write a migration. Answer: Who writes schema.rb and what is
the golden rule?
◉ A migration is Ruby code (a class) that
represents a change in schema
Create new tables (including column
names and column types)
Modify existing tables (adding/removing
columns, or changing associations)
Delete ("drop") existing tables. Answer: What is a migration?
◉ Schema is a version of the database. It is regenerated every time you
do a migration. Every change in schema means writing a
, migration. Answer: What is the difference between a migration and a
schema?
◉ The name is meaningful (starts with Add or Remove). ie $ rails g
migration AddNickNameToStudent
nick:string. Answer: What is important about migrations for table edits?
◉ GET, /students, Collection, index, list all
POST, /students, Collection, create, show one
GET, /students/new, Collection, new, blank form
GET, /students/3, Member, show, show one
GET, /students/3/edit, Member, edit, filled form
PUT, /students/3, Member, update, show one
DELETE, /students/3, Member, destroy, list all. Answer: For the
resource: students list the 7 routes that are included with the action pack.
Include HTTP verb, URL, Resource, Method, View
◉ Test boundary conditions
eg 0, empty array, empty string
Test different categories of input
eg positive, negative, and zero
Test different categories of behavior
eg each menu option, each error message
WITH SOLUTIONS GRADED A+
◉ http://web.cse.ohio-state.edu/~giles/3901/lectures/lecture16.pdf slide
4. Answer: Draw an example of MVC
◉ It is generated! (tool called rake)
Golden rule: Never edit schema.rb directly
Instead, write a migration. Answer: Who writes schema.rb and what is
the golden rule?
◉ A migration is Ruby code (a class) that
represents a change in schema
Create new tables (including column
names and column types)
Modify existing tables (adding/removing
columns, or changing associations)
Delete ("drop") existing tables. Answer: What is a migration?
◉ Schema is a version of the database. It is regenerated every time you
do a migration. Every change in schema means writing a
, migration. Answer: What is the difference between a migration and a
schema?
◉ The name is meaningful (starts with Add or Remove). ie $ rails g
migration AddNickNameToStudent
nick:string. Answer: What is important about migrations for table edits?
◉ GET, /students, Collection, index, list all
POST, /students, Collection, create, show one
GET, /students/new, Collection, new, blank form
GET, /students/3, Member, show, show one
GET, /students/3/edit, Member, edit, filled form
PUT, /students/3, Member, update, show one
DELETE, /students/3, Member, destroy, list all. Answer: For the
resource: students list the 7 routes that are included with the action pack.
Include HTTP verb, URL, Resource, Method, View
◉ Test boundary conditions
eg 0, empty array, empty string
Test different categories of input
eg positive, negative, and zero
Test different categories of behavior
eg each menu option, each error message