Name:
Contact Phone No/Email address:
Date:
Programming Skill Evaluation Test
The test can be answered in Chinese or English. (测试可使用中文或英文作答)
1. | Consider classes below.
What is the result when teacher.getDescription() is called? | ||||||||||||||||||
Ans. |
| ||||||||||||||||||
2. | Please write class Magazine according to the diagram.
| ||||||||||||||||||
Ans. |
| ||||||||||||||||||
3. | Consider the following code fragment.
3.1 Suppose there are 2 elements in labels array. What is the value of counter after executing this method? Please specify reasons.
3.2 Can this class be compiled if the try block is removed? Please specify reasons.
| ||||||||||||||||||
Ans. |
| ||||||||||||||||||
4. | What is the purpose of adding ‘synchronized’ to a method signature? E.g. pubic synchronized boolean leased () {… }
| ||||||||||||||||||
Ans. |
| ||||||||||||||||||
5. | Below is a XML <b:listGrid id='ogrid' width="auto" height="100%" readonly="true" rowClasses="rowClass1, rowClass2"> <b:dataSource e:behavior="b:localData" dataType="application/xml"> <b:dataContainer> <xi:include href="examples/data/gridData.xml" /> </b:dataContainer> </b:dataSource> <b:listGridCol select="title" label="Title" title="title" datatype="string" width="200px" /> <b:listGridCol select="genre" label="Genre" title="genre" datatype="string" width="100px" /> <b:listGridCol select="rating" label="Rating" title="rating" datatype="number" width="70px" align="right" /> </b:listGrid>
Can you write an Xpath to get the node with label=”Genre”? | ||||||||||||||||||
Ans: |
| ||||||||||||||||||
6. | Consider the following classes.
If there a object defined in this way, Person person = new Student(“ICIL”); What is the result when calling person.printProfile(10)? Please specify reasons. | ||||||||||||||||||
Ans. |
| ||||||||||||||||||
7. | Can you write a CSS to set all HTML tr element with background color = red? | ||||||||||||||||||
Ans. |
| ||||||||||||||||||
8. | Can you write a regular expression for a string with numbers only | ||||||||||||||||||
Ans.
|
| ||||||||||||||||||
9. | Given the following table in MySQL. The table consists of 10,000 records Employee Table
Consider the SQL statement below and comment the size of result set in JDBC. What is the effect of result set when the number of record in Employee table growth?
SELECT * from Employee. SELECT emp_id, emp_firstname, emp_lastname from Employee. SELECT emp_id, emp_firstname, emp_lastname from Employee limit 1000, 25. | ||||||||||||||||||
Ans. |
| ||||||||||||||||||
10 | What is outer join in SQL? Why it needs to be used? Please give an example.
| ||||||||||||||||||
Ans. |
| ||||||||||||||||||
11 | What is deadlock in RDBMS context? How to avoid it?
| ||||||||||||||||||
Ans. |
| ||||||||||||||||||
12. | Please give an example for:
SELECT from 2 tables SELECT with GROUP BY Update Update one table based on a second table If you have following batch of SQL: Insert into table A values (123, 'Student A', 'Teacher B', 'Class C') Insert into table B values (123, 'English', 'Grade A') Insert into table B values (123, 'Math', 'Grade B')
If the third statement failed, how can you ensure the first and second statement will not be applied to the database too If a table has columns Student_ID Student_NAME Teacher Class
What is the SQL to find the number of students taught by each teacher? vii. When you first create the table, you do not have a unique key index on Student_ID, afterwards you realize the mistake, and want to add the unique key index on the column, but the database server complains that the data for that column is not unique. What SQL can be used to find out which Student_ID (s) cause the problem?
| ||||||||||||||||||
Ans. |
| ||||||||||||||||||
13. | Personal Statement (MUST answer in English) What is your major interest? What do you want to achieve in your career? | ||||||||||||||||||
Ans. |
|