CSC309 Midterm Exam Summer 2007

Similar documents
PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science

UNIVERSITY OF TORONTO Faculty of Arts and Science DECEMBER 2015 EXAMINATIONS. CSC309H1 F Programming on the Web Instructor: Ahmed Shah Mashiyat

Web Site Development with HTML/JavaScrip

Programming in HTML5 with JavaScript and CSS3

Implementing a chat button on TECHNICAL PAPER

Part A Short Answer (50 marks)

COURSE 20480B: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

Introduction to HTML5

GRAPHIC WEB DESIGNER PROGRAM

CIW: JavaScript Specialist. Course Outline. CIW: JavaScript Specialist. 30 Dec

20480B: Programming in HTML5 with JavaScript and CSS3

Programming in HTML5 with JavaScript and CSS3

Schenker AB. Interface documentation Map integration

Kingdom of Saudi Arabia Ministry of Higher Education College of Computer & Information Sciences Majmaah University. Course Profile

Course 20480: Programming in HTML5 with JavaScript and CSS3

Web Computing. Revision Notes

CS134 Web Site Design & Development. Quiz1

What is XHTML? XHTML is the language used to create and organize a web page:

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

Ministry of Higher Education and Scientific Research

CSEN202: Introduction to Computer Science Spring Semester 2017 Midterm Exam

5/19/2015. Objectives. JavaScript, Sixth Edition. Understanding the Browser Object Model and the Document Object Model. Objectives (cont'd.

Create a cool image gallery using CSS visibility and positioning property

UNIVERSITY OF TORONTO Faculty of Arts and Science. Midterm Sample Solutions CSC324H1 Duration: 50 minutes Instructor(s): David Liu.

Problem Description Earned Max 1 HTML/CSS Interpretation 30 2 HTML/CSS Programming 30 3 JavaScript Programming 40 X Extra Credit +1 TOTAL 100

LA TROBE UNIVERSITY SEMESTER ONE EXAMINATION PERIOD CAMPUS AW BE BU MI SH ALLOWABLE MATERIALS

HTML Overview. With an emphasis on XHTML

IT2353 WEB TECHNOLOGY Question Bank UNIT I 1. What is the difference between node and host? 2. What is the purpose of routers? 3. Define protocol. 4.

Kingdom of Saudi Arabia Ministry of Higher Education College of Computer & Information Sciences Majmaah University. Course Profile

Project 3 CIS 408 Internet Computing

HTML 5 and CSS 3, Illustrated Complete. Unit L: Programming Web Pages with JavaScript

INSTRUCTIONS FOR FACULTY USER MANUAL CENTRE FOR PROFESSIONAL STUDIES. 1 P age

Introduction to HTML5

UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2016 EXAMINATIONS. CSC309H1 S Programming on the Web Instructor: Ahmed Shah Mashiyat

Module 2 (III): XHTML

Perfect Student Midterm Exam March 20, 2007 Student ID: 9999 Exam: 7434 CS-081/Vickery Page 1 of 5

Lecture : 3. Practical : 2. Course Credit. Tutorial : 0. Total : 5. Course Learning Outcomes

Comp 426 Midterm Fall 2013

Web Development 20480: Programming in HTML5 with JavaScript and CSS3. Upcoming Dates. Course Description. Course Outline

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK

CSI 3140 WWW Structures, Techniques and Standards

JavaScript 3. Working with the Document Object Model (DOM) and DHTML

CSCI 5333 DBMS Spring 2018 Final Examination. Last Name: First Name: Student Id:

Course Outline. TERM EFFECTIVE: Summer 2016 CURRICULUM APPROVAL DATE: 11/23/2015

blink.html 1/1 lectures/6/src/ form.html 1/1 lectures/6/src/

ICT1512 Introduction to Interactive Programming. Assignment 7 Discussion

CSC309 Final Lecture

CIW: Advanced HTML5 and CSS3 Specialist. Course Outline. CIW: Advanced HTML5 and CSS3 Specialist. ( Add-On ) 16 Sep 2018

SYLLABUS. Departmental Syllabus. Departmental Syllabus. Departmental Syllabus. Departmental Syllabus. Departmental Syllabus

Wicket and Aida/Web Brief Comparison

JSF - H:INPUTSECRET. Class name of a validator that s created and attached to a component

CMT111-01/M1: HTML & Dreamweaver. Creating an HTML Document

Student Number: Legibly write your name and student number on this page. Legibly write your name on the back page of this exam.

Web Design and Application Development

Programming in HTML5 with JavaScript and CSS3

I Can t Believe It s Not

Computer Science E-259

Produced by. App Development & Modeling. BSc in Applied Computing. Eamonn de Leastar

UNIVERSITY OF TORONTO Faculty of Arts and Science

Building Your Blog Audience. Elise Bauer & Vanessa Fox BlogHer Conference Chicago July 27, 2007

Question Marks 1 /20 2 /16 3 /7 4 /10 5 /16 6 /7 7 /24 Total /100

Problem Description Earned Max 1 HTML / CSS Tracing 20 2 CSS 20 3 PHP 20 4 JS / Ajax / JSON 20 5 SQL 20 X Extra Credit 1 TOTAL Total Points 100

CSE 344 Midterm. Wednesday, February 19, 2014, 14:30-15:20. Question Points Score Total: 100

Microsoft Programming in HTML5 with JavaScript and CSS3

Getting started with jquery MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

Introduction. Part I: jquery API 1. Chapter 1: Introduction to jquery 3

How I Learned to Stop Worrying and Love the KSS

SYLLABUS. Departmental Syllabus. HTML Web Page Development. Departmental Syllabus. Departmental Syllabus. Departmental Syllabus. Departmental Syllabus

CIW: JavaScript Specialist v2.0. Course Outline. CIW: JavaScript Specialist v Jun 2018

CECS 189D EXAMINATION #1

PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science

PHP / MYSQL DURATION: 2 MONTHS

HTML: The Basics & Block Elements

AIM. 10 September

CFP Education GTP FAQ


CSE 131S Introduction to Computer Science Summer SON Exam I

WIRIS quizzes web services Getting started with PHP and Java

OFBiz Content Management How to

JavaScript Introduction

Computer Science Department

Varargs Training & Software Development Centre Private Limited, Module: HTML5, CSS3 & JavaScript

Problem Description Earned Max 1 PHP 20 2 JS 20 3 JS / Ajax / JSON 20 4 SQL 20 X Extra Credit 1 TOTAL Total Points 100

CSE 154, Autumn 2012 Final Exam, Thursday, December 13, 2012

Notes General. IS 651: Distributed Systems 1

IT6503 WEB PROGRAMMING. Unit-I

Sample CS 142 Midterm Examination

UNIVERSITY OF TORONTO SCARBOROUGH WINTER 2016 EXAMINATIONS. CSC B20H3 Duration 3 hours. No Aids Allowed

Midterm spring. CSC228H University of Toronto

PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science

Computer Science E-75 Building Dynamic Websites

Shankersinh Vaghela Bapu Institue of Technology

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018)

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

Extensible Markup Language (XML) Hamid Zarrabi-Zadeh Web Programming Fall 2013

Demonstrate web development using appropriate HTML markup tags, elements and attributes.

Please note that if you write the mid term in pencil, you will not be allowed to submit a remark request.

COURSE OUTLINE MOC 20480: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

The Irving K. Barber School of Arts and Sciences COSC 111 Final Exam Winter Term II Instructor: Dr. Bowen Hui. Tuesday, April 19, 2016

Document Object Model. Overview

Transcription:

UNIVERSITY OF TORONTO Faculty of Arts and Science Midterm Exam July 2007 CSC 309 H1 F Instructor Dr. Radu Negulescu Duration 1 hour Examination Aids: One single-sided page containing notes NAME STUDENT NUMBER PART I (Short Answers): /20 PART II (Programming): /40 Total: /60 Part I of this examination is a series of short-answer questions. Part II of this examination is a programming exercise. Answer all questions in the spaces provided on this examination paper. There is no need to use more space than is provided. If you must, then use the back of the examination paper and so indicate in your answer. General Advice: o Skim through the entire exam before beginning your detailed work, to get a sense of where best to spend your time; if you get stuck on one question, go on to another and return to the difficult question later. o For the programming exercise, if unsure of API details or language syntax details, try your best and include a comment indicating what you are attempting to achieve assuming a typical API. o Partial credit will be granted in cases that demonstrate correct reasoning, even if an error leads to an incorrect final result. Good luck! Page 1 of 9

Part I Short Answer Questions 1.- [10 points] Describe 2 main advantages of JavaScript over Java Applets and 2 main advantages of Java Applets over JavaScript. (1 line each maximum) 2.- [10 points] Draw a simple flowchart showing the main steps and the flow for an iterative process used in web development. Briefly describe a main reason why iterations are important. Page 2 of 9

Part II - Programming Question 3.- [40 points] (a) [20 points] Use XHTML to write a web page with a form for ordering pizza. When loaded, the page should appear as shown below. To avoid clutter, use only 3 options for each select element (for example, use only months 07, 08, and 09 for the expiry date). Be sure to preserve alignment of items. The Submit button sends all the user inputs to URL http://www.pizzaprontooftoronto.ca/orders. The Reset button resets the form. Write your solution in the space provided on Pages 3-4 starting at the DOCTYPE declaration below. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> Page 3 of 9

</html> Page 4 of 9

(b) [10 points] Use CSS to give a red color to the Pizza Pronto header and a green color to the backgrounds of the buttons, text inputs, and drop down lists, as shown below. The CSS code will be embedded in the web page of Part (a). Do NOT rewrite your solution to Part (a); write only the required CSS code in the space provided below and indicate the line number in your solution to Part (a) at which this CSS code will be inserted. Page 5 of 9

(c) [10 points] Modify your solution to Part (a) by adding a button labelled More to insert another pizza ordering section into the form. Pressing More repeatedly inserts multiple pizza ordering sections into the form. The ordering page area, located in between the title and card areas, may therefore comprise multiple ordering sections and a single More button as shown on Page 7. Use JavaScript to modify the DOM of the page so that the new inputs and selections will be included in the generated request. Do NOT rewrite your solution to Part (a). Write in the space below only the new XHTML and JavaScript code required for Part (c), and indicate the line numbers of your solution to Part (a) where this new code will be inserted. Depending on the solution chosen, you may use one or more of the JavaScript methods and properties on Pages 8-9. You may also use other JavaScript methods and properties at your discretion. JavaScript also supports Java-like String operators such as +, +=, etc. Page 6 of 9

New aspect for the ordering page area before pressing More : New aspect for the ordering page area after pressing More twice: Page 7 of 9

Selected JavaScript reference The indexof() method returns the position of the first occurrence of a specified string value in a string, or -1 if no occurrences are found. stringobject.indexof(searchvalue,fromindex) searchvalue fromindex Required. Specifies a string value to search for Optional. Specifies where to start the search The replace() method is used to replace some characters with some other characters in a string. stringobject.replace(findstring,newstring) findstring newstring Required. Specifies a string value to find. To perform a global search add a 'g' flag to this parameter and to perform a case-insensitive search add an 'i' flag Required. Specifies the string to replace the found value from findstring The substring() method extracts the characters in a string between two specified indices. stringobject.substring(start,stop) Start Stop Required. Where to start the extraction. Must be a numeric value Optional. Where to stop the extraction. Must be a numeric value The length property returns the number of characters in a string. stringobject.length The innerhtml property sets or returns the text of an element. Page 8 of 9

elementobject.innerhtml=text The clonenode() method creates an exact copy of a specified node. This method returns the cloned node. elementobject.clonenode(include_all) include_all Required. If the Boolean parameter is set to true, the cloned node clones all the child nodes of the original node as well The appendchild() method adds a node after the last child node of the specified element node. This method returns the new child node. elementobject.appendchild(node) Node Required. The node to append The getelementbyid() method returns a reference to the first object with the specified ID. document.getelementbyid(id) Page 9 of 9