Transcript reviewFinal

Final Review
1
Final Review
Final Exam
 30% of your grade for the course
 December 9 at 7:00 p.m., the regular
class time
 No makeup exam or alternate times
 Closed book
 Closed notes
 No computers
2
Final Review
Material Covered
 Comprehensive
 All material covered in our classroom lectures, the
bonus labs, the handouts, and our homework
 I may ask a question about anything that we have
covered in class, however the majority of the
questions will be about what we covered starting
in week 7 and continuing through the end of the
semester.
3
Final Review
Material Covered
 The most important topics to study
•
ADO.NET
– Interacting with a database
•
ASP.NET with C#
–
–
–
–
–
–
•
Web controls
Properties of the Page class, such as Request, Session, and IsPostBack
State management, especially the Session
AutoPostBack
Validation
Data binding
JavaScript
– Regular expressions
– Events and event handling
– Writing a function
•
•
HTTP
Cookies
 Some other topics that you still need to understand
The Internet and the World Wide Web; HTML, XHTML, and HTML Forms; CSS; XML; the DOM
4
Final Review
Test Format
Approximately 20–25 questions
•
Multiple choice – approximately 25%
•
Short answers (not code) – approximately 5%
•
Short code (1 line) – approximately 20%
•
Longer code – approximately 50%
•
Possibly an extra credit question for 5 points
5
Final Review
Examples
Short code (1 or 2 lines)
•
Given a diagram showing the location of the files and directories in your
Web site, write the code for inserting an image, using a relative path
•
Given the HTML code for a simple form that uses a GET method, write
the HTTP request that is submitted
Longer code (approximately 5–25 lines of code)
•
Given a requirements description and a screen shot of a simple HTML
page, write a JavaScript function that gets input from a text field, uses a
regular expression to test it, and puts the result into the value of a text
field on the page
•
Given a connection string, a SQL query, and an empty Page_Load
method, write the code for the Page_Load method that adds the query
results to a Label control on the first time the page is viewed
6
Final Review
Suggestions for Studying

Look at the Learning Objectives on the course syllabus

Study the review document, “StudyGuide2.docx”, which will be posted on the class
discussion page

Concentrate your study time on the major topics that we have covered in class

Make sure that you know the syntax for the most common types of code that we
studied
•
•
•
•
•
•
•
Can you write a simple JavaScript function?
Do you know how to use regular expressions in JavaScript?
Are you familiar with some simple ASP.NET web controls such as Label, Button, TextBox, etc.
Are you familiar with the important properties of the Page class?
Can you write the C# code for a simple event handler for the button click?
Can you write the C# code to add data to a Session?
Given a connection string, can you write the C# code to interact with a database?

Consider meeting with your team for a study session

Review the bonus labs and handouts distributed in class
7
Final Review
Sample Regular Expression Question
Write the regular expression that is missing from the code below. Your
regular expression must be valid only for the years, 2008, 2009, and 2010.
No other characters are allowed, not even white spaces.
function validateExpireYear() {
var result = document.getElementById("result");
var input = document.getElementById("input");
if (input.value.match(______________________)) {
result.innerHTML = "valid";
}
else {
result.innerHTML = "NOT valid";
}
}
Some possible answers:
/^2008$|^2009$|^2010$/
/^20(08|09|10)$/
/^((2008)|(2009)|(2010))$/
/^20(0[89]|10)$/
8
References
MacDonald, Matthew, Beginning ASP.NET 3.5 in C# 2008: From Novice to
Professional, Second Edition. Apress, 2007.
Schultz, David and Craig Cook, Beginning HTML with CSS and XHTML:
Modern Guide and Reference. Apress, 2007.
9