CSE 3901 – MIDTERM 2 EXAM (ACTUAL
EXAM) WITH CORRECT QUESTIONS AND
WELL ANSWERED ANSWERS LATEST WELL
GRADED A+ 2025 – 2026
General strategy for Object oriented tables - ANSWERS-
Table in database - a class
Table columns - attributes of the class
table rows - instances of class (objects)
Table names should always be plural - ANSWERS-true
What does each column in a database table have? -
ANSWERS-a name and a type
what are some constraints you can add besides types -
ANSWERS-"not null"
"is unique"
,what is a good practice in regards to the first column of a
table - ANSWERS-a "primary key"
ie just a column with integers 1-n
How can you link tables? - ANSWERS-include a column in
table X containing keys from table Y (uses type: "foreign
keys")
Describe Visual Identity (code reuse/single POC) Motivation
- ANSWERS--Having common headers and footers and
making the whole website have a base design for every
page
-duplicated code ruins single POC
-Solution: putting common HTML in one file (a partial) and
every page includes it
What is ERb? - ANSWERS-Embedded Ruby
-things like <% code %> <%= expr %> and <%# text %>
How to generate a site - ANSWERS-save source files as
html.erb
>> bundle exec middleman build
,this then makes them .html
what is a partial - ANSWERS-a document fragment included
in other documents
-include in template as <%= partial "navigation" %>
what is special about naming a partial? - ANSWERS-they
always start with _ and end in .erb still (no html)
How to customize arguments with a partial - ANSWERS-in
the normal page when you call the partial:
<%= partial "banner", :locals => { :name => "Syllabus",
:amount => 34 } %>
in the partial file:
<h3> ,%= name %> </h3>
<p> Costs <%= "$#{amount}.00" %></p>
What is Layout - ANSWERS-It is a file that can make a
consistent structure across every page in a website
, How do you label where there's page specific stuff in
Layout.erb? - ANSWERS-<%= yield =>
How do you fix the issue of using a layout when each page
needs a diff <title>? - ANSWERS-Ruby variable current_page
ie: current_page.path
So in the actual page file you put:
<title><%= current_page.data.title %> </title>
and in the layout.erb:
---
title: "Contact Info"
---
What is the main difference in syntax when using
middleman? - ANSWERS-Not having to use tags because
that part is in layout
What are some common plain text conventions? -
ANSWERS-blank lines between paragraphs
Underlining: - or =
EXAM) WITH CORRECT QUESTIONS AND
WELL ANSWERED ANSWERS LATEST WELL
GRADED A+ 2025 – 2026
General strategy for Object oriented tables - ANSWERS-
Table in database - a class
Table columns - attributes of the class
table rows - instances of class (objects)
Table names should always be plural - ANSWERS-true
What does each column in a database table have? -
ANSWERS-a name and a type
what are some constraints you can add besides types -
ANSWERS-"not null"
"is unique"
,what is a good practice in regards to the first column of a
table - ANSWERS-a "primary key"
ie just a column with integers 1-n
How can you link tables? - ANSWERS-include a column in
table X containing keys from table Y (uses type: "foreign
keys")
Describe Visual Identity (code reuse/single POC) Motivation
- ANSWERS--Having common headers and footers and
making the whole website have a base design for every
page
-duplicated code ruins single POC
-Solution: putting common HTML in one file (a partial) and
every page includes it
What is ERb? - ANSWERS-Embedded Ruby
-things like <% code %> <%= expr %> and <%# text %>
How to generate a site - ANSWERS-save source files as
html.erb
>> bundle exec middleman build
,this then makes them .html
what is a partial - ANSWERS-a document fragment included
in other documents
-include in template as <%= partial "navigation" %>
what is special about naming a partial? - ANSWERS-they
always start with _ and end in .erb still (no html)
How to customize arguments with a partial - ANSWERS-in
the normal page when you call the partial:
<%= partial "banner", :locals => { :name => "Syllabus",
:amount => 34 } %>
in the partial file:
<h3> ,%= name %> </h3>
<p> Costs <%= "$#{amount}.00" %></p>
What is Layout - ANSWERS-It is a file that can make a
consistent structure across every page in a website
, How do you label where there's page specific stuff in
Layout.erb? - ANSWERS-<%= yield =>
How do you fix the issue of using a layout when each page
needs a diff <title>? - ANSWERS-Ruby variable current_page
ie: current_page.path
So in the actual page file you put:
<title><%= current_page.data.title %> </title>
and in the layout.erb:
---
title: "Contact Info"
---
What is the main difference in syntax when using
middleman? - ANSWERS-Not having to use tags because
that part is in layout
What are some common plain text conventions? -
ANSWERS-blank lines between paragraphs
Underlining: - or =