代写Sample Exam for COMP 466, Revision 6代做留学生Java程序
- 首页 >> OS编程Sample Exam for COMP 466, Revision 6
About the final exam
1. The final exam is an online closed-book examination. Only materials distributed with this examination maybe used by the student to answer examination questions. The student is
NOT allowed to use texts, workbooks, or notes, or to consult with other people while writing this examination.
2. The use of a calculator is permitted, but hand-held computers and smartphones are not allowed.
3. A maximum of three hours is allowed to write the final exam.
4. The final examination for this course will be written in an online format. Please consult the Online
Exams (MuchLearning) section of the Procedures for Applying for and Writing Examinations in your online Student Manual and visit https://www.athabascau.ca/support-services/exam-services-support/ index.html for more information.
Part One: Multiple-choice Questions (40 x 1 marks)
Circle the letter or letters of the choice(s) that will best fill in the blank(s) or answer the question:
1. Which of the following is the proper way to dynamically access background color?
a. document.body.style.BackgroundColor
b. document.body.attributes.BackgroundColor
c. document.body.style.backgroundColor
d. document.body.style.background-color
2. The property adds a shadow to an element.
a. text-shadow
b. box-shadow
c. blur-radius
d. linear-gradient
3. are stored by the browser on the user’s computer to maintain client-specific information during and between browser sessions.
a. files
b. documents
c. cookies
d. substrings
4. Attempting to createthe namespace prefix in any mixture of cases is an error.
a. xml b. urn c. text d. xsl
5. The computer on which a web service resides is referred to as a _.
a. server
b. client.
c. web service host
d. service repository
6. JSON does not have a built-in way to represent .
a. strings b. arrays c. dates d. objects
7. Making a web service available to receive client requests is known as a web service.
a. accessing.
b. serving.
c. consuming.
d. publishing.
8. Each method in a RESTful web service is identified by a unique _.
a. URL.
b. data format.
c. HTTP method (GET, POST, etc.).
d. cache.
9. In PHP, the statement $$inputName is .
a. referencing a variable whose name is equal to the value of $inputName
b. defining an array named $inputName
c. shorthand for typing $inputName twice
d. a syntax error
10. A relational database table consists of rows and .
a. rows
b. primary keys
c. columns
d. result sets
11. When an XMLHttpRequest object receives a response from the server, it invokes a , which usually performs a to display the retreived data.
a. recursive function, browser reload
b. anonymous function, browser redirect
c. callback function, partial page update
d. delayed function, database query
12. Document type definition files define the for an XML document.
a. size and encoding
b. margins
c. structural rules
d. rendering instructions
13.The method is used to draw a curve with a single point of inflection using four arguments.
a. curveTo
b. bezierCurveTo
c. quadraticCurveTo
d. Both b. and c.
14. The specifies the color of the rectangle.
a. fillRect
b. fill
c. strokeRect
d. fillStyle.
15. When the browser calls an event-handling function, it passes a(n) to the function.
a. load event
b. window object
c. event object
d. None of the above.
16. To find out when a document was last modified, use the document object’s property.
a. lastModified
b. lastChanged
c. modDate
d. dateChanged
17. When does a recursive program go into infinite recursion?
a. if the loop-continuation test never becomes false
b. if the recursion test never becomes false
c. if the loop-continuation test never becomes true
d. if the recursion step does not converge on the base case
18. The “prepackaged” functions that belong to JavaScript objects such as Math.pow and Math.round are often called .
a. subroutines b. routines
c. methods d. functions
19. What would the browser display if the following script. were executed?
a. Nothing; the script. would generate an error.
b. OOOO
c. OOOOO
d. OOOOOO
20. What type of loop should be used in a script. that processes test results for 150 students?
a. counter controlled b. sentinel controlled c. algorithm controlled d. stepwise controlled
21. CSS3 allows you to create multicolumn layouts using the property.
a. column-rule b. column-count c. column-gap d. column-style.
22. CSS3 allow you to move, rotate, scale and skew elements.
a. selectors
b. transitions
c. transformations
d. translations
23. The is the URL of the image to use in the border.
a. border-image-source
b. border-image
c. image-source
d. image-border-source
24. The is the URL of the image to use in the border.
a. border-image-source
b. border-image
c. image-source
d. image-border-source
25. Style. sheets use which of the following MIME types?
a. image/gif
b. text/javascript.
c. text/css
d. text/html
26. Text put between the tags appears in the browser’s title bar (i.e., the dark bar at the top of the browser window).
a.
b.
d.
27. The input type enables the user to enter a date in the format yyyy-mm-dd.
a. date
b. datetime-local
c. datetime
d. datetime-utc
28. The method specifies the location at which the color of the gradient changes.
a. colorStop
b. addColorStop
c. addColor
d. gradientColorStop
29. Use the method to draw a radial gradient to a canvas.
a. createRadialGradient
b. drawRadialGradient c. startRadialGradient
d. radialGradient
30. A JSON object is represented as a list contained in .
a. curly braces
b. square brackets c. single quotes d. double quotes
31. Function getElementById returns a(n) .
a. boolean
b. string
c. id attribute d. object
32. Which property or method is used to modify an attribute of an XML DOM element?
a. attribute
b. the property with the same name as the attribute
c. attributeValue
d. setAttribute
33. JavaScript. was primarily designed to run in which tier of a three-tier web application?
a. user interface (top) tier
b. business logic (middle) tier c. information (bottom) tier d. none of the above.
34. Each list item in an unordered list is delineated by the element.
a. li b. disc c. ul d. href
35. An example of the proper format for inline styles is:
a.
b.
c.
d.
36. The hover pseudo-class allows you to change to an element’s style in which situation?
a. when the mouse is over the element
b. when the mouse moves off of the element c. when the mouse is to the left of the element d. none of the above
37. is a type of image that gradually transitions from one color to the next horizontally, vertically or diagonally.
a. Box shadow b. Color stop
c. Radial gradient d. Linear gradient
38. Which of the following is a valid value for the animation-direction?
a. normal
b. clockwise
c. counterclockwise d. both b. and c.
39. Using a web service from a client application is known as a web service.
a. accessing
b. serving
c. consuming
d. publishing
40. The computer on which a web service resides is referred to as a .
a. server
b. client
c. web service host
d. service repository
Part Two: Programming Questions (3 x 20 marks)
1. (20 marks) By definition the Greatest Common Divisor (GCD) of two integers M and N is an integer that is the greatest among the numbers that can divide both M and N. Write a web page with embedded PHP scripts that can find out the GCD of M and N (both are non-zero), which are input from the user. The found GCD shall be displayed in the HTML5 table along with the M and N, as well as all other common divisors for people to check that the number is indeed a GCD. In the form for users to input M and N, JavaScript should be used to
validate the input to make sure it is a non-zero integer number.
2. (20 marks) Create an XML document that marks up the structure of COMP 466, up to
sections, and then create an XML schema to describe the structure of your XML document.
3. (20 marks) Using the server-side programming language you chose for your third assignment (ASP.NET in C#, ASP.NET in VB, or JSF), write a web page that will allow users to order computers and related parts. The order form. should have input fields for user contact information, including name, mailing address, email, and telephone number, as well as a list of computers and a list ofparts. The user inputs need to be validated, and the total cost of the order should be dynamically shown whenever a selection is made or changed. Once the form. is submitted, the user inputs should be displayed in a well laid-out format including the IP address of the user’s computer.