You are on page 1of 4

SENIORS INTERVIEW QUESTIONS

Do all questions in 2 hours (Max) total 30marks (Pass Mark 24) Names: …………………………………………………………………………………………………………… ………Date ………………………………… Question 1 (html-css presentation and php processing); 10 points Generate a grid similar to the one below using PHP, Html, Tables and CSS . (Numbers increment columns first). In this grid change the cell background as follows.
0 1 2 3 … … … … 3 7 3 8 3 9 4 0 4 1 4 2 … … … … … … 7 8 7 9 8 0 8 1 … … … … … … … … 19 1 10 2 … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … 80 8 … … … … … … … … … 99 1 90 2 91 2 … … … … … … … 98 5 99 5 90 6 91 6 92 6 … … … … … 97 9 98 9 99 9

1. 2. 3. 4. 5.

First column is cyan [----] First row is yellow [----] multiples of 8 are orange [----] square values are red [----] prime numbers are black [----] (text is white) Number of rows and columns are up to you If color overlap the later dominates i.e. 64 is red instead of orange.

Question 2a (php & database); 8 points Build a simple web page with one text box and a search button. When submitted your form will process as described in (Question 3) and display results as follows.
1. Display search phrase and first 30 records. Also indicate how many results exist. Highlight perfect match words as Bold. Highlight misspelled match words with Bold and italics. Display the score that the record has on the search phrase. Display records ordered by score descending. (Highest score first)

2. 3. 4. 5.

Question 2b (AJAX); 8 points Using a javascript library of your choice. Make a call to a server side script ( onclick ). Update two separate divs using separate parts of the results returned. The server side script pulls record number 8 from question 3 below. The diagram below illustrates the required result.

Question 3 (Database). Use this table to search for records. (4) most words with highest count. • Your queries should be optimized to minimize load and data transferred. create a mysql database called Interview. • Consider records which match at least 30% of the search words. (3) most search words with mismatched word misspelled. • Tag records with a score values in the following order. Your search should meet the following requirements. (5) most search words. (1) all words in the same order. • Search for the words in any given order “This is a search phrase” and “A search phrase this is”.e.255) • date created (current time) • date modified ( current time . On your localhost using. Inside it a table messages with the following structure • id (primary key) • message (var char . (2) all words in any order. .auto-update) populate it with 200 records of random data . 5 matches of 3/4 search words then 4 matches of 3/4 search words. i. user name guest with password interview. 4 points To be used in (Question 2).

2 points.98/php mysql manual : http://192. No marks overall if table is hard-coded. Question 1: (10 marks) • Table generation code PHP.98/java Time taken: 3 Marks. • Queries used to extract data 1 point. 2. e. 1 point. 3. • Result presentation 2 points. No marks if page not loading. 1 point. 2 points 1 point.98/mysql java manual : http://192. 2. Rules: 1. • Clean HTML & CSS: • Number setup and presentation • Row and column colors & logic: • Square and octal colors & logic: • Prime number colors & logic: • CSS allocation logic overall: Rules: 1. No marks if DB is not being used. Questions 2b (8 marks) • Java input control and general code implementation 1 point. No marks for fixed logic.g. No marks for colors if not using CSS.g. Question 3: (4 marks shared between 2a and 2b) • Mysql Command Line manipulation. Rules: 1.0. • Result manipulation and scoring logic 1 point. 1 point.MARKING SCHEME: Php manual : http://192. using “select * from messages” Question 2a: (8 marks) • HTML form and PHP processing Security against SQL injection 1 point.0.168. • Query generation logic and general search algorithm 2 points. No query marks if all computation is in application e. 1 point. 3 points.0. • Error handling/ reporting and user controls 1 point. .168.168. using (if($x == 4)).

1 point. No marks if DB is not being used. 1 point. No marks if program is not running. . Rules: 1. 2.• • • • Query generation logic and general search algorithm Result manipulation and scoring logic Result presentation Error handling/reporting and user controls 2 points. 2 points.