CSE 3901 Final - EXAM Questions with 100% Correct Answers | Verified |
Updated (Actual Exam) Already Graded A+ Latest Update!!!
Explain model view controller - (answer)Model
The data (ie state)
Methods for accessing and modifying state
View
Renders contents of model for user
When model changes, view must be
updated
Controller
Translates user actions (ie interactions
with view) into operations on the model
Example user actions: button clicks, menu
selections
Draw an example of MVC - (answer)http://web.cse.ohio-state.edu/~giles/3901/lectures/lecture16.pdf
slide 4
Who writes schema.rb and what is the golden rule? - (answer)It is generated! (tool called rake)
Golden rule: Never edit schema.rb directly
Instead, write a migration
What is a migration? - (answer)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
, CSE 3901 Final - EXAM Questions with 100% Correct Answers | Verified |
Updated (Actual Exam) Already Graded A+ Latest Update!!!
What is the difference between a migration and a schema? - (answer)Schema is a version of the
database. It is regenerated every time you do a migration. Every change in schema means writing a
migration
What is important about migrations for table edits? - (answer)The name is meaningful (starts with Add
or Remove). ie $ rails g migration AddNickNameToStudent
nick:string
For the resource: students list the 7 routes that are included with the action pack. Include HTTP verb,
URL, Resource, Method, View - (answer)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
What are the best type of inputs for testing? - (answer)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
Test "unexpected" input
eg nil, last name includes a space
Test representative "normal" input
eg random, reasonable values
Updated (Actual Exam) Already Graded A+ Latest Update!!!
Explain model view controller - (answer)Model
The data (ie state)
Methods for accessing and modifying state
View
Renders contents of model for user
When model changes, view must be
updated
Controller
Translates user actions (ie interactions
with view) into operations on the model
Example user actions: button clicks, menu
selections
Draw an example of MVC - (answer)http://web.cse.ohio-state.edu/~giles/3901/lectures/lecture16.pdf
slide 4
Who writes schema.rb and what is the golden rule? - (answer)It is generated! (tool called rake)
Golden rule: Never edit schema.rb directly
Instead, write a migration
What is a migration? - (answer)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
, CSE 3901 Final - EXAM Questions with 100% Correct Answers | Verified |
Updated (Actual Exam) Already Graded A+ Latest Update!!!
What is the difference between a migration and a schema? - (answer)Schema is a version of the
database. It is regenerated every time you do a migration. Every change in schema means writing a
migration
What is important about migrations for table edits? - (answer)The name is meaningful (starts with Add
or Remove). ie $ rails g migration AddNickNameToStudent
nick:string
For the resource: students list the 7 routes that are included with the action pack. Include HTTP verb,
URL, Resource, Method, View - (answer)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
What are the best type of inputs for testing? - (answer)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
Test "unexpected" input
eg nil, last name includes a space
Test representative "normal" input
eg random, reasonable values