Programming and Database Technologies Quiz

Test your knowledge of Java programming, SAS programming, SQL databases, JDBC, and web technologies

19 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following design patterns reduces the coupling between presentation-tier clients and business services in a web application?

  1. Value Objects
  2. MVC
  3. Data Access Object
  4. Business Delegate
Question 2 Multiple Choice (Single Answer)

Which of the following statements regarding GET and POST methods are true?

  1. GET is the method commonly used to request a resource from the server
  2. POST is the method commonly used to request a resource from the server.
  3. GET is the method commonly used for passing user input to the server
  4. POST is the method commonly used for passing user input to the server
Question 3 Multiple Choice (Single Answer)

if(check4Biz(storeNum) != null) {} Referring to the above, what datatype could be returned by method check4Biz()?

  1. boolean
  2. int
  3. String
  4. char
Question 4 Multiple Choice (Single Answer)

The following expression……….char c = -1;

  1. will cause a compiler error as the range of character is between 0 and 2^16 - 1. Will request for an explicit cast.
  2. will not cause a compiler error and c will have the value -1;
  3. c will not represent any ASCII character.
  4. c will still be a Unicode character.
Question 5 Multiple Choice (Single Answer)

All the wrapper classes (Integer, Boolean, Float, Short, Long, Double and Character)

  1. are public
  2. are serializable
  3. are immutatable
  4. extend java.lang.Number
Question 6 Multiple Choice (Single Answer)

Which of the following statements uses embedded dynamic SQL?

  1. SELECT col1 INTO :hv from table1
  2. EXECUTE IMMEDIATE SELECT col1 INTO :hv FROM table1
  3. DECLARE c1 CURSOR FOR s1
  4. IMMEDIATE SELECT col1 INTO :hv FROM table1
Question 7 Multiple Choice (Single Answer)

What is the difference between a TextArea and a TextField?

  1. A TextArea can handle multiple lines of text
  2. A textarea can be used for output
  3. TextArea is not a class
  4. TextAreas are used for displaying graphics
Question 8 Multiple Choice (Single Answer)

How many statements does the program below contain? proc sql; select grapes,oranges, grapes + oranges as sumsales from sales.produce order by sumsales;

  1. two
  2. three
  3. four
  4. five
Question 9 Multiple Choice (Single Answer)

Which of the following statements is false wrt Improving Query Performance.

  1. Omitting the ORDER BY clause when you create tables and views improve the query performance.
  2. using joins instead of subqueries improve the query performance.
  3. A good practice to improve query performance is using WHERE expressions to limit the size of result tables created with joins.
  4. Must use the ORDER BY clause when you create tables and views.
Question 10 True/False

The RESET statement enables you to add, drop, or change the options in PROC SQL without restarting the procedure.True or False?

  1. True
  2. False
Question 11 Multiple Choice (Single Answer)

Which of the following correctly creates a macro variable in a PROC SQL step?

  1. call symput(daily_fee, put(fee/days, dollar8.);
  2. %let daily_fee=put(fee/days, dollar8.)
  3. select fee/days format=dollar8. into :daily_fee from sasuser.a
  4. select fee/days format=dollar8. into daily_fee from sasuser.all;
Question 12 Multiple Choice (Single Answer)

What option is used with PROC FORMAT to document the formats in a particular format catalog?

  1. FMTSEARCH
  2. FMTERR
  3. CATALOG
  4. FMTLIB
Question 13 Multiple Choice (Single Answer)

Which statement about using the MODIFY statement in a DATA step is true?

  1. MODIFY creates a second copy of the data while variables in the data are being matched with a WHERE clause and then deletes the second copy.
  2. You cannot modify the descriptor portion of the data set using the MODIFY statement
  3. You can use the MODIFY statement to change the name of a variable.
  4. If the system terminates abnormally while a DATA step that is using the WHERE statement is processing, SAS automatically saves a copy of the unaltered data set.
Question 14 Multiple Choice (Single Answer)

Which of the clauses in the PROC SQL program below is written incorrectly? proc sql; select style sqfeet bedrooms from choice.houses where sqfeet ge 800;

  1. SELECT
  2. FROM
  3. WHERE
  4. both a and c
Question 15 Multiple Choice (Single Answer)

Given the following PROC FORMAT step, how is the value 70 displayed when the AGEGRP. format is applied? proc format; picture agegrp 1-<13=’00 Youth’ 13-<20=’00 Teen’ 20-<70=’00 Adult’ 70-high=’000 Senior’; run;

  1. 000 Senior
  2. 70 Adult
  3. 70 Senior
  4. 070 Senior
Question 16 Multiple Choice (Single Answer)

Given the following PROC FORMAT step, how is the value 6.1 displayed when the SKICOND format is applied? proc format; value skicond 0-3=’Poor’ 3<-6=’Fair’ 6<-9=’Good’ 9<-high=’Excellent’; run;

  1. 6.1
  2. Fair
  3. Good
  4. . (Missing)
Question 17 Multiple Choice (Single Answer)

Given the following program, which variable names will appear in the data set Work.New? proc transpose data=work.revenue out=work.new; run; Dataset : Obs Year Jan Feb Mar Apr 1 2000 1234 56345 2445 234676 2 2001 67676 787 7878 343535 3 2002 56736 89890 676 7878

  1. Year, Jan, Feb, Mar, Apr
  2. Year, 2000, 2001, 2002
  3. NAME, Col1, Col2, Col3
  4. NAME, Jan, Feb, Mar, Apr
Question 18 Multiple Choice (Multiple Answers)

Which statements about JDBC are true?

  1. JDBC is an API to connect to relational-, object- and XML data sources
  2. JDBC stands for Java DataBase Connectivity
  3. JDBC is an API to access relational databases, spreadsheets and flat files
  4. JDBC is an API to bridge the object-relational mismatch between OO programs and relational
Question 19 Multiple Choice (Single Answer)

Which packages contain the JDBC classes?

  1. java.jdbc and javax.jdbc
  2. java.jdbc and java.jdbc.sql
  3. java.sql and javax.sql
  4. java.rdb and javax.rdb