Chris Pollett> Old Classses >
CS174

( Print View )

Student Corner:
[Final Exam-PDF]

[Submit Sec1]
[Grades Sec1]

[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 2020Practice Final

For the final I would suggest you:

  • Know how to do (by heart) all the practice problems.
  • Go over your notes at least three times. Second and third time try to see how much you can remember from the first time.
  • Go over the homework problems.
  • Try to create your own problems similar to the ones I have given and solve them.
  • If you want to study in groups, at this point you are ready to quiz each other.

The practice final is below. Here are some facts about the actual final:

  1. It is open book, open notes, open internet, however, you are not allowed to discuss problems on the final with classmates or other people until after the final submission period is over.
  2. The final will have 10 problems.
  3. It will be posted as one of the links on the side of the class homepage.
  4. You submit the final for grading using the same mechanism as to submit homeworks.
  5. It is designed to take an 2h15m, however, it will be posted by 12:15pm on Dec 10 and you can submit it up until Dec 11 at 11:59pm.
  6. Some problems will be dependent on some personal information about you such as your ID, and you will not receive credit if you don't make use of this information correctly.
  7. One problem will be off the practice midterm and two problems will be off the practice final.
  8. Six problems will be on material after the midterm, four will be one material before.

On practice final day, please post your problem solutions, including the names of all your teammates, to the Practice Final Thread.

  1. Give the PHP code necessary to connect to a Mysql database named your last name, then perform a query on the Employee(name VARCHAR(20), birthDate DATE) table for the database for all employees that share your birthdate, returning and printing in an output HTML document the results as an ordered list.
  2. What is class autoloading in PHP and give a briefly example of how to set it up and how it works. Your example should make use of a namespace that contains your actual first name.
  3. Give the commands to create a git repository named after your favorite movie villain. Give the commands to do a three commits on this repository (say also what files you edited), then give the command to make a patch from the last two commits.
  4. Write a Javascript function descendingNameNumbers(...), that can take a variable number of arguments, and which returns a sorted array of those arguments which were Numbers, prefixing those Numbers with your first name. For example, for me, your instructor, descendingNameNumbers(2.3, 3, "lala", 1, [0, 1], {o:"yeah"}) would return [Chris3, Chris2.3, Chris1].
  5. Describe how the value of an object property is looked up in Javascript.
  6. Write a short Javascript function which when called checks each input tag on the current document. If any of them contain a string which matches the last four digits of your ID, it pops up an alert saying, "Hey, you're not me", and returns false. Otherwise, it returns true.
  7. Write a simple DTD for wedding invitations has as its main element the tag Invitation with sub-elements Bride, Groom, Date. Your language should support a Invitation having a RSVP attribute which can only have for its value RSVP. Give an example document in your language based on a fan fiction reference of your choice.
  8. Explain and give an example for each of the following: (a) C10K problem, (b) REST, (c) Promise.
  9. Describe each of the following ways to attack a web-site and give an example involving your favorite cartoon character: (a) SQL Injection Attack, (b) Click-Jacking Attack, (c) Inclusion Attack
  10. 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.