University of Washington, CSE 154 Section 10: Practice Final Exam Problems

Similar documents
Problem Description Earned Max 1 HTML/CSS Interpretation 30 2 HTML/CSS Programming 30 3 JavaScript Programming 40 X Extra Credit +1 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

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

CSc 337 LECTURE 15: REVIEW

Databases and SQL. Lecture outline. CSE 190 M (Web Programming) Spring 2008 University of Washington

G I F T U N I V E R S I T Y

Problem Description Earned Max 1 HTML/CSS 20 2 Javascript/DOM 20 3 Ajax/XML 20 5 PHP 20 4 SQL 20 X Extra Credit +1 TOTAL 100

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

Problem Description Earned Max 1 HTML/CSS Tracing 15 2 HTML/CSS Coding 15 3 JavaScript/DOM 20 TOTAL Day's Total Points 50

Problem Description Earned Max 1 HTML/CSS Tracing 15 2 HTML/CSS Coding 15 3 JavaScript/DOM 15 TOTAL Day's Total Points 45

a) <div id="coffee"> <p>*('o')*</p> <ul> <li>aaa</li> <li id="c">bbb</li> <li>ccc</li> </ul> </div>

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

Problem Description Earned Max 1 CSS 2 PHP 3 PHP/JSON 4 Ajax 5 Regular Expressions 6 SQL TOTAL Total Points 100

Wanted! Introduction. Step 1: Styling your poster. Activity Checklist. In this project, you ll learn how to make your own poster.

CSC 121 Computers and Scientific Thinking

a) <div id="coffee"> <p>*('o')*</p> <ul> <li>aaa</li> <li id="c">bbb</li> <li>ccc</li> </ul> </div>

Introduction to WEB PROGRAMMING

CSS Styles Quick Reference Guide

A Balanced Introduction to Computer Science, 3/E

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

CSE 154 LECTURE 23:RELATIONAL DATABASES AND SQL

Using CSS in Web Site Design

HTMLnotesS15.notebook. January 25, 2015

Problem Description Earned Max 1 PHP 25 2 JavaScript/DOM 25 3 Regular Expressions 25 4 SQL 25 TOTAL Total Points 100

Exam II CIS 228: The Internet Prof. St. John Lehman College City University of New York 5 November 2009

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

Appendix D CSS Properties and Values

Meijer.com Style Guide

Web Design and Development ACS Chapter 12. Using Tables 11/23/2017 1

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100

Html basics Course Outline

ICT IGCSE Practical Revision Presentation Web Authoring

<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.

Zen Garden. CSS Zen Garden

COSC 2206 Internet Tools. CSS Cascading Style Sheets

HTML. Mohammed Alhessi M.Sc. Geomatics Engineering. Internet GIS Technologies كلية اآلداب - قسم الجغرافيا نظم المعلومات الجغرافية

Introduction to using HTML to design webpages

The building block of a CSS stylesheet. A rule consists of a selector and a declaration block (one or more declarations).

Exercise #2: your Profile

To link to an external stylesheet, the link element is placed within the head of the html page:

Page Layout. 4.1 Styling Page Sections 4.2 Introduction to Layout 4.3 Floating Elements 4.4 Sizing and Positioning

1 of 7 11/12/2009 9:29 AM

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

By Ryan Stevenson. Guidebook #2 HTML

COMP1000 Mid-Session Test 2017s1

Problem Description Earned Max 1 CSS 20 2 PHP 20 3 SQL 10 TOTAL Total Points 50

Adding CSS to your HTML

WEBSITE PROJECT 2 PURPOSE: INSTRUCTIONS: REQUIREMENTS:

c122sep2214.notebook September 22, 2014

Getting Started with Eric Meyer's CSS Sculptor 1.0

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

The Importance of the CSS Box Model

Problem Description Earned Max 1 PHP 25 2 JavaScript / DOM 25 3 Regular Expressions 25 TOTAL Total Points 100. Good luck! You can do it!

LING 408/508: Computational Techniques for Linguists. Lecture 14

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference

Web Engineering CSS. By Assistant Prof Malik M Ali

HTML and CSS: An Introduction

<style type="text/css"> <!-- body {font-family: Verdana, Arial, sans-serif} ***set font family for entire Web page***

Programmazione Web a.a. 2017/2018 HTML5

Student, Perfect CS-081 Final Exam May 21, 2010 Student ID: 9999 Exam ID: 3122 Page 1 of 6 Instructions:

Module 2 (VII): CSS [Part 4]

Lab Introduction to Cascading Style Sheets

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

Lab 2: Movie Review. overview.png background.png rottenbig.png rbg.png fresh.gif rotten.gif critic.gif

Controlling Appearance the Old Way

Question 1. (5 points) CSS

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2)

epromo Guidelines DUE DATES NOT ALLOWED PLAIN TEXT VERSION

CSCE 101. Creating Web Pages with HTML5 Applying style with CSS

Comp-206 : Introduction to Software Systems Lecture 23. Alexandre Denault Computer Science McGill University Fall 2006

CS 350 COMPUTER/HUMAN INTERACTION. Lecture 6

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

CS 1100: Web Development: Client Side Coding / Fall 2016 Lab 2: More HTML and CSS

Creating a Newsletter

3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets

- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations

CSS Selectors. element selectors. .class selectors. #id selectors

CSE 154: Web Programming Autumn 2018

Reading 2.2 Cascading Style Sheets

Note: The screenshots in this document were taken on Windows in Firefox, which may differ from your system.

CSc 337 Final Examination December 13, 2013

Page Layout Using Tables

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

Ministry of Higher Education and Scientific Research

Unit 20 - Client Side Customisation of Web Pages. Week 2 Lesson 4 The Box Model

3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets

Parashar Technologies HTML Lecture Notes-4

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

CSE 190 M, Spring 2008, Final Exam ANSWER KEY

ICT IGCSE Practical Revision Presentation Web Authoring

Creating Layouts Using CSS. Lesson 9

DAY 4. Coding External Style Sheets

Enhancing your Page. Text Effects. Paragraph Effects. Headings

CSS THE M\SS1NG MANUAL. David Sawyer McFarland. POGUE PRESS" O'REILLr Beijing Cambridge Farnham Köln Paris Sebastopol Taipei Tokyo

Table of Contents. MySource Matrix Content Types Manual

Microsoft Expression Web Quickstart Guide

Chapter4: HTML Table and Script page, HTML5 new forms. Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL

How to Edit Your Website

Student, Perfect Final Exam May 25, 2006 ID: Exam No CS-081/Vickery Page 1 of 6

Transcription:

University of Washington, CSE 154 Section 10: Practice Final Exam Problems section problems by Sylvia Tashev, Brian Le, and several UW student volunteers Today we will solve some practice problems similar to the problems that will be on our final exam. Try these out first using paper and pencil! 1. HTML / CSS Interpretation Draw a picture of how the following HTML and CSS code will look when the browser renders it onscreen. Indicate a background coloring by shading lightly or by drawing repeated diagonal lines like. Draw the image geneva.jpg as a smiley face occupying roughly 20% of the page width. HTML <h1>baby Geneva's Web Page</h1> <div id="notice"> <img src="geneva.jpg" alt="geneva" /> What is your name? <input type="text" size="20" value="geneva" /> <span class="notice">(mine is cuter!)</span> </div> <p class="notice">i <br /> am <br /> 15 <br /> months <br /> old</p> <p class="notice"> My <br /> favorite <br /> toy <br /> is <br /> your <br /> cell phone </p> <h2>(written by Geneva, May 2008)</h2> CSS h1,.notice { text-align: center; border: 2px solid black; h2 { clear: both; h2, #notice { border-top: 1px dashed black; border-bottom: 1px dashed black; p.notice { border: 2px solid black; float: right; width: 10%; #notice.notice { text-decoration: underline;

2. HTML / CSS - Apples: Write HTML (just what's in the body) and CSS code to reproduce the following page: The following are details about the appearance of the page: Make all headings green, and make them use Garamond font or any serif font on the system. The quote should be italicized. The apples picture name is greenapples.jpg. It also links to http://www.apple.com/. All pictures should have no borders and be 250 pixels wide. The right section has a 2 pixel wide outset green border and a background of #99cc99. Every other line in the "types of apples" list is white and its font-size is 120% as large as the other list items. The definition terms are bolded. Notice that there are two distinct sections on the page. The content inside each section should be 20 pixels away from all edges. Note: Don't forget to use proper tags for all of the elements that clearly describe the content on the page.

3. PHP - Image Gallery Search: The following HTML snippet is the skeleton of a simple search page for an image gallery. <h1>image Gallery Search<h1> <form action="search.php" method="get"> <fieldset> Type a query: <input type="text" name="query" /> <br /> <input type="submit" value="search" /> </fieldset> </form> Write a PHP program called search.php to implement the searching feature. An image is considered a "match" to the search string if the name of the image contains the entirety of the search string. For example, a query of "tea" might match "tea.jpg" or "steamboat.jpg". You should output an unordered list of links to all matches. A blank query should return no results. The gallery stores all of its images in a directory called images. You may assume there are only image files in the images directory. The search should be case-insensitive and you should eliminate the whitespace surrounding a query before processing it. Here is a ZIP gallery of images you can use to test your program.

4. JavaScript - Flower Garden: Write the necessary JavaScript code garden.js for the functionality of the following page: This page allows the user to plant a number of flower patches in their garden. The input box for the # of flower patches has an id of "count". The "Plant Garden" button has an id of "plant". The "Clear" button has an id of "clear". When the user clicks on "Plant Garden" the page should generate the # of flower patches given in the input box on the page. The flower patches are images; either daffodils.jpg or roses.jpg. Choose randomly what kind of flower patch to show. Clicking on the "Clear" button removes all flower patches from the garden.

5. Ajax/JavaScript - Music Search: Write the necessary JavaScript code for the Ajax functionality of the following page. This page allows the user to search for songs. You are given access to a web service music.php. To use the service, you may send in a query parameter named term. The service will then return all of the songs that contain the search term in the following XML format. If you send the empty string "", the service will return a list of all songs. <songs> <song genre="pop" duration="3:48"> <title>dance Like Michael Jackson</title> <artist>the Far East Movement</artist> <album>animal</album> </song> <song genre="soundtrack" duration="3:11"> <title>aaj Ki Raat</title> <artist>a. R. Rahman</artist> <album>slumdog Millionaire</album> </song> </songs> You will need to parse the XML to display all the songs returned to the page. The search button has an id of "search" The search textfield has an id of "query" Each song is displayed as a paragraph in the div with an id of "results". For each song returned, you must display the following separated by hyphens: Title of the song Artist of the song Duration of the song You may assume that the request will be successful; you do not need to write any onfailure or onexception functions. Here is a runnable solution.

6. SQL - Duplicate Cities: Some countries have two cities with the same name. For example, there are several cities in the USA named Springfield, which is part of the reason that name was chosen for the home town of the Simpsons. Using the world database, find all such cities where there are two or more cities within the same country that have the same name. Show both the country name and the city name. Eliminate duplicate results and order by the country name, breaking ties by the city name. Recall the world database schema: countries code name continent independence_year population gnp head_of_state... AFG Afghanistan Asia 1919 22720000 5976.0 Mohammad Omar... NLD Netherlands Europe 1581 15864000 371362.0 Beatrix........................... cities id name country_code district population 3793 New York USA New York 8008278 1 Los Angeles USA California 3694820............... This is the output you should get: +--------------------+--------------+ country city +--------------------+--------------+ China Jining China Jinzhou China Kaiyuan China Suzhou China Yichun Indonesia Depok Mexico Guadalupe Mexico La Paz Mexico Matamoros Philippines San Carlos Philippines San Fernando Philippines San Jose Russian Federation Zeleznogorsk United States Arlington United States Aurora United States Columbus United States Glendale United States Kansas City United States Pasadena United States Peoria United States Richmond United States Springfield +--------------------+--------------+ 22 rows in set (14.48 sec) languages country_code language official percentage AFG Pashto T 52.4 NLD Dutch T 95.6............