Chris Pollett> Old Classses >
CS174

( Print View )

Student Corner:
[Submit Sec2]
[Grades Sec2]

[Lecture Notes]
[Discussion Board]

Course Info:
[Texts & Links]
[Description]
[Course Outcomes]
[Outcomes Matrix]
[Course Schedule]
[Grading]
[Requirements/HW/Quizzes]
[Class Protocols]
[Exam Info]
[Regrades]
[University Policies]
[Announcements]

HW Assignments:
[Hw1] [Hw2] [Hw3]
[Hw4] [Hw5] [Quizzes]

Practice Exams:
[Midterm] [Final]

CS174 Fall 2022Practice Final

If you did well on the midterm, the same approach to studying should work for the final. If not, if adjust the amount of studying you do for the final and experiment with how the way you are studying helps you remember the material and how it affects your ability to use the material flexibly.

Here are some facts about the actual final:

  1. It is comprehensive covering all the material of the semester.
  2. It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test.
  3. You should bring photo ID.
  4. There will be more than one version of the test. Each version will be of comparable difficulty.
  5. It is 10 problems, 6 problems will be on material since the midterm, four problems will come from the topics covered prior to the midterm.
  6. Two problems will be exactly (less typos) off of the practice final, and one will be off of practice midterm.

The practice final is below:

  1. Write a PHP program using the msqli OO interface has connects to a Mysql database Business on the default port of localhost, then using a prepared statement inserts a record to an Employee table with schema (ssn, fname, lname, date_of_birth, salary).
  2. Make a small PHP class Foo in the namespace your_first_name\great_project with method renderFoo() that echo's the word foo and which uses trait Loo with method renderLoo() that echo's loo. Make a second class Goo in the namespace your_surname\some_other_project which subclasses the class Foo you just wrote and has a method renderGoo which echo goo.
  3. Miscellaneous short questions. (a) How do you register an autoloader callback in PHP. (b) How do you create a new repository in git. (c) How do you determine who wrote a line of code in git? (d) How do you create a patch in git.
  4. Write dtd for news items. A news items should have a verified attribute that can only have value verified. A news item should allow four subtags: (a) date, (b) source, (c) headline, (d) url. Each of these are allowed to contain parsable content data.
  5. Write a Javascript program which outputs a 25x25 table whose data items are X's and O's output in a checkerboard pattern. Render the result to both a HTML table and to the console. Make use of a function using the => syntax.
  6. Give HTML and Javascript necessary to output a form with a ssn field and a submit button. The form will only be submitted if the ssn is a valid social security number in the format XXX-XX-XXXX.
  7. Give an application code example of each of the following in Javascript: (a) timer, (b) XHR request, (c) a Javascript class with a private property, (d) Promise, await and aync.
  8. Briefly describe and give an example of the following web service related topics: (a) Javascript fetch API, (b) JSON, (c) REST, (d) GraphQL.
  9. Describe each of the following ways to attack a web-site and give an example involving your favorite comic book character: (a) CSRF Attack, (b) Click-Jacking Attack, (c) Target blank Attack
  10. Give the definition from class for what it means for a web-site to be scalable. Define the following: (a) reverse proxy server, (b) ORM cache, (c) CDN.
  11. Show with code (a) how to serve a static page with express, (b) how to determine the value of a posted form variable in Express, (c) connect to a database in Node, (d) write log messages using middleware.