INFO / CSE 100 FINAL EXAM SOLUTIONS March 19, 2009

Similar documents
c122jan2714.notebook January 27, 2014

Problem 1: Textbook Questions [4 marks]

JS Lab 1: (Due Thurs, April 27)

1. Please, please, please look at the style sheets job aid that I sent to you some time ago in conjunction with this document.

11. HTML5 and Future Web Application

Programming Lab 1 (JS Hwk 3) Due Thursday, April 28

Here are the steps in downloading the HTML code for signatures:

Chapter 7: The Internet

Your departmental website

A340 Laboratory Session #5

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

Student, Perfect Midterm Exam March 24, 2006 Exam ID: 3193 CS-081/Vickery Page 1 of 5

Beginning HTML. The Nuts and Bolts of building Web pages.

c122sep814.notebook September 08, 2014 All assignments should be sent to Backup please send a cc to this address

1. The basic building block of an HTML document is called a(n) a. tag. b. element. c. attribute. d. container. Answer: b Page 5

GSLIS Technology Orientation Requirement (TOR)

ORB Education Quality Teaching Resources

Exercise 1 Using Boolean variables, incorporating JavaScript code into your HTML webpage and using the document object

Programmazione Web a.a. 2017/2018 HTML5

CMPSCI 120 Fall 2017 Lab #2 Professor William T. Verts

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

Codes and Coding. Objectives: Related Careers

Introduction to HTML

Web Design and Development ACS Chapter 3. Document Setup

Title: Jan 29 11:03 AM (1 of 23) Note that I have now added color and some alignment to the middle and to the right on this example.

(Refer Slide Time: 01:41) (Refer Slide Time: 01:42)

Task 1. Set up Coursework/Examination Weights

introduction to XHTML

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

CSE 3 Final Summer 2006

Title: Sep 12 10:58 AM (1 of 38)

GSLIS Technology Orientation Requirement (TOR)

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

Arrays/Branching Statements Tutorial:

Full file at New Perspectives on HTML and CSS 6 th Edition Instructor s Manual 1 of 13. HTML and CSS

This is a paragraph. It's quite short.

Documentation for Flash Project

CSCI 1100L: Topics in Computing Spring 2018 Web Page Project 50 points

JAVASCRIPT - CREATING A TOC

Faculty Personal Website Instructions

INTRODUCTION TO WEB USING HTML What is HTML?

Introduction to using HTML to design webpages

Dreamweaver Handout. University of Connecticut Prof. Kent Golden

CMPSCI 120 Fall 2017 Midterm Exam #1 Solution Key Friday, October 6, 2017 Professor William T. Verts

Announcements. Paper due this Wednesday

introjs.notebook March 02, 2014

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

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017)

Unit Notes. ICAWEB411A Produce basic client-side script for dynamic web pages Topic 1 Introduction to JavaScript

<script> function yourfirstfunc() { alert("hello World!") } </script>

Lesson 1: Writing Your First JavaScript

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

EVENT-DRIVEN PROGRAMMING

JavaScript Introduction

BASIC HTML LAB 4. Vocabulary. Discussion and Procedure

Imagery International website manual

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

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser.

HTML+ CSS PRINCIPLES. Getting started with web design the right way

CIW 1D CIW JavaScript Specialist.

Bridges To Computing

ADOBE Dreamweaver CS3 Basics

How the Internet Works

Variables and Typing

Campaign Walkthrough

Boolean Expressions. Is Equal and Is Not Equal

Project 2: After Image

The University of Hawaii at Manoa Library Webpage Content/Design/Style Guidelines General Site Design... 2

Client Side JavaScript and AJAX

Boolean Expressions. Is Equal and Is Not Equal

Dreamweaver: Accessible Web Sites

CS 110 Exam 2 Spring 2011

Creating Web Pages Using Netscape Composer AGENDA FOR THIS WORKSHOP. 1. How does it all work? 2. What do I need to get started at Fairfield?

Professor Program. Grading Scantron Exams

HTML/CSS Lesson Plans

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

The print queue was too long. The print queue is always too long shortly before assignments are due. Print your documentation

Creating A Web Page. Computer Concepts I and II. Sue Norris

File: SiteExecutive 2013 Core Modules User Guide.docx Printed September 30, 2013

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

GoLive will first ask you if your new site will be for one individual or a work group; select for a Single User, and click Next.

A Balanced Introduction to Computer Science, 3/E David Reed, Creighton University 2011 Pearson Prentice Hall ISBN

It is possible to create webpages without knowing anything about the HTML source behind the page.

page 1 OU Campus User Guide

AP Computer Science. Peeking at Programming with JavaScript Student Guide. Martin Callaghan John Leggott College Scunthorpe, UK

Lab 8 CSE 3,Fall 2017

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? editor editor Q.2: What do you understand by a web browser?

HTML and CSS: An Introduction

CS 110 Exam 1 Fall 2011

1/6/ :28 AM Approved New Course (First Version) CS 50A Course Outline as of Fall 2014

DREAMWEAVER QUICK START TABLE OF CONTENT

Google on Your Own PC

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

CS Multimedia and Communications REMEMBER TO BRING YOUR MEMORY STICK TO EVERY LAB!

Dynamism and Detection

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

CIT 590 Homework 5 HTML Resumes

Programming language components

16B. Laboratory. Linking & Images in HTML. Objectives. References

Transcription:

INFO / CSE 100 FINAL EXAM SOLUTIONS March 19, 2009 1. (5 points) You have a PowerPoint file on your computer called presentation.ppt. You change the filename to presentation.txt and open the file in a text editor (NotePad in Windows; TextEdit on Macs). What will you see and why? Data in files are just 1 s and 0 s. Bits have no inherent meaning. Different programs interpret the data in their own way. When you change the name of a file, the data in the file does not change. When you open a PowerPoint file in a text editor, you will see gibberish, because the text editor is trying to interpret the bits as text, but the data is in a format that is only understood by PowerPoint. 2. (5 points) Explain the general idea (not the specific details of transistors) of Moore's Law. Technology is improving at a very rapid rate, specifically exponentially. Technological capability doubles roughly every 2 years. 3. (5 points) You are downloading a file onto your computer. Halfway through, the downloading suddenly aborts. Which is more likely: (a) your computer ran out of memory, or (b) your computer ran out of hard drive space? Why? (In your answer, explain the difference between memory and hard drive.) Memory is for storing data needed by programs that are currently in use. If your computer crashes, anything in memory is lost. Hard drive is for long-term storage that survives after turning the computer off. When you download a file, you are saving it to your computer for future use. The file you are downloading is not running. You are not using the file right then and there. So if the download suddenly stops, it s probably because you ran out of hard drive storage space. If you thought that the file was stored in memory first before being saved to the hard drive, you would get 4 points. What if you wanted to download really big files that exceed your computer s memory? If you assumed that too many programs were running and that s why the downloading stopped, you would not get full credit, because you made an extra assumption that was not in the problem statement. 1

4. (5 points) You want to find out which mountain has the grandest height in Europe. What would you type into Yahoo s search box? For full credit, you wrote something like: tallest mountain Europe highest mountain Europe We accepted quoted answers if they could reasonably be found in a phrase like: Europe s highest mountain (vs. mountain highest Europe ) Answers that used grandest got partial credit, because no one refers to the tallest / highest mountain as one of grandest height. 5. (5 points) State what the computer knows at every line after the line has been executed: Computer knows var x = 1; x = 1 var y = 2; x = 1, y = 2 x = y; x = 2, y = 2 y = 3; x = 2, y = 3 6. (5 points) What does having more memory on a computer allow you to do? Having more memory lets you run more programs simultaneously. You can also run bigger programs that process more data faster. 7. (5 points) What are cookies? Where do they come from? What are they for? Cookies are small chunks of text that you initially get from the web server of a web site that you visited. They are used by the server to keep track of your user information. Every time you revisit the web site, the web browser sends whatever cookies it got from the server back to it. 2

8. (10 points) a) FROM start.html, you want to link TO next.html, fill in the blank: In start.html: <a href="next.html"> b) FROM pics.html, you want to show pic.jpg, fill in the blank: In pics.html: <img src="../reviews/movies/pic.jpg" /> c) FROM next.html, you want to link TO todo.txt, fill in the blank: In next.html: <a href="../todo.txt"> 3

4

9. (15 points) For the web page displayed on the previous page, finish the HTML below. Assume that the picture of Cookie Monster (the furry creature in the picture, for those not in the know) is in the same directory in a file called cookie_monster.jpg. The link goes to http://myuw.washington.edu. The HTML you write does NOT have to conform to the XHTML 1.0 Strict standard. However, your HTML should be indented properly and all tags must be closed properly. <html> <head> <title>exam Problem Page</title> </head> <body> <h1>things to do today:</h1> <ul> <li>take this exam.</li> <li>take a nap.</li> <li>party <em>until dawn</em>!</li> </ul> <div> Go to <a href="http://myuw.washington.edu">myuw</a> <br /> <img src="cookie_monster.jpg" /> </div> </body> </html> As we did not require your HTML to conform to the XHTML 1.0 Strict standard, the <div> element is unnecessary. Almost everyone used <p> or nothing at all. One odd mistake was some people swapped <ul> with <li>. That only cost 2 points. 5

6

10. (20 points) The previous page shows a web page that asks for a user s name and height (in inches). After the Verify Height button is clicked, if the given height is 48 or more, then the message <name>, enjoy the ride! will appear; otherwise, the message will be I m sorry, <name>, you cannot ride the rollercoaster. where <name> is the name the user entered. You may have the message appear in an alert box (as pictured on the previous page) OR in the space below the button on the web page itself (similar to the lab with the movie tickets). Do whichever is easiest for you. Finish the HTML and JavaScript below and on the back of this page. Use proper indentation in both files. In the JavaScript file, use meaningful variable names. HTML: <html> <head> <title>exam Problem JavaScript</title> <script src="example2.js" type="text/javascript"> </script> </head> <body> Name: <input type="text" id="name" /><br /> Height: <input type="text" id="height" /> inches<br /> <input type="button" value="verify Height" onclick="verify();" /> </body> </html> JavaScript: function verify() { var name = document.getelementbyid("name").value; var height = document.getelementbyid("height").value; if (height >= 48) { alert(name + ", enjoy the ride!"); } else { alert("i'm sorry, " + name + ", you cannot ride the rollercoaster."); } } 7

11. (5 points) The menu option Visual Basic Editor is highlighted in the above picture. a) Starting with all menus closed, how would you access that menu option using only mnemonics (the underlined letters)? Alt-T, M, V b) Starting with all menus closed, how else can you access that menu item without using the mouse? Alt+F11 8

Table Name: People Table Name: Jobs 9

12. (15 points) The previous page shows two tables in some database: People and Jobs. The Jobs table lists the companies that the people in the People table have worked for at some point in time. a) Write a query to answer What are the names of the people who are students and what are their ages? Running your query should give you the following: SELECT UserName, Age FROM People WHERE Occupation = 'Student' b) Write a query to answer Where has everyone worked? Running your query should give you the following: SELECT UserName, HasWorkedFor FROM People INNER JOIN Jobs ON People.ID = Jobs.PersonID 10

c) Write a query to answer Where has Eve worked? You must use a join. Running your query should give you the following: SELECT HasWorkedFor FROM People INNER JOIN Jobs ON People.ID = Jobs.PersonID WHERE UserName = 'Eve' 11