CSE 143, Winter 2013 Programming Assignment #2: HTML Validator Due Thursday, July 10, 2014, 11:30 PM
|
|
|
- Brendan Holmes
- 9 years ago
- Views:
Transcription
1 CSE 143, Winter 2013 Programming Assignment #2: HTML Validator Due Thursday, July 10, 2014, 11:30 PM This program focuses on using Stack and Queue collections. Turn in files named HtmlValidator.java, and HtmlValidatorTest.java from the Homework section of the course web site. You will need HtmlTag.java and ValidatorMain.java from the web site; place them in the same folder as your program. Though this assignment relates to web pages and HTML, you do not need to know how to write HTML to complete it. Background Information About HTML: Web pages are written in a language called Hypertext Markup Language, or HTML. An HTML file consists of text surrounded by markings called tags. Tags give information to the text, such as formatting (bold, italic, etc.) or layout (paragraph, table, list). Some tags specify comments or information about the document (header, title, document type). A tag consists of a named element between less-than < and greater-than > symbols. For example, the tag for making text bold uses the element b and is written as <b>. Many tags apply to a range of text, in which case a pair of tags is used: an opening tag indicating the start of the range and a closing tag indicating the end of the range. A closing tag has a / slash after its < symbol, such as </b>. So to make some text bold on a page, one would put the text to be bold between opening and closing b tags, <b>like this</b>. Tags can be nested to combine effects, <b><i>bold italic</i></b>. Some tags, such as the br tag for inserting a line break or img for inserting an image, do not cover a range of text and are considered to be "self-closing." Self-closing tags do not need a closing tag; for a line break, only a tag of <br> is needed. Some web developers write self-closing tags with an optional / before the >, such as <br />. The distinction between a tag and an element can be confusing. A tag is a complete token surrounded by <> brackets, which could be either an opening or closing tag, such as <title> or. An element is the text inside the tag, such as title or head. Some tags have attributes, which are additional information in the tag that comes after the element. For example, the tag <img src="cat.jpg"> specifies an image from the file cat.jpg. The element is img, and the rest of the text such as src are attributes. In this assignment we will ignore attributes and focus just on elements and tags. If you're curious, there are tutorials such as and HTML Validation: One problem on the web is that many developers make mistakes in their HTML code. All tags that cover a range must eventually be closed, but some developers forget to close their tags. Also, whenever a tag is nested inside another tag, <b><i>like this</i></b>, the inner tag (i for italic, here) must be closed before the outer tag is closed. So the following tags are not valid HTML, because the </i> should appear first: <b><i>this is invalid</b></i> Below is an example of a valid HTML file, with its tags in bold. <!-- and --> are comment tags. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- This is a comment --> <title>turtles are cool</title> <meta http-equiv="content-type" content="text/html"> <link href="style.css" type="text/css" /> <p>turtles swim in the <a href=" <p>some turtles are over 100 years old. Here is a picture of a turtle: <img src="images/turtle.jpg" width="100" height="100" /> </body> In this assignment you will write a class that examines HTML to figure out whether it represents "valid" sequences of tags. Your validator will use stacks and queues to figure out whether the tags match. Instructor-provided code will read HTML pages from files and break them apart into tags for you; it's your job to see whether the tags match correctly. 1 of 5
2 Implementation Details: You will write a class named HtmlValidator. You must use Java's Stack and Queue from java.util. Your class must have the constructors/methods below. It must be possible to call the methods multiple times in any order and get the correct results each time. Several methods interact with HtmlTag objects, described later. Unless otherwise specified, you may not create auxiliary data structures (such as arrays, lists, stacks, queues) to help you solve any method below. public HtmlValidator() public HtmlValidator(Queue<HtmlTag> tags) Your class should have two constructors. The first should initialize your validator to store an empty queue of HTML tags. The second should initialize your validator with an entirely separate copy of the queue that was passed in. If the caller passes a queue to your constructor, after your constructor is done executing, the client s queue should have the same state as when it was passed in, and any subsequent modifications to one queue should not be reflected in the other. The queue for the page shown previously would contain the tags below. Further tags can be added by calling addtag. front [<!doctype>, <!-- -->,,, <title>, </title>, <meta>, <link>,,, <p>, <a>, </a>,, <p>, <img>,, </body>, ] back If the queue passed is null, you should throw an IllegalArgumentException. An empty queue (size 0) is allowed. The constructors are allowed to construct a queue to store your validator's tags if necessary. public void addtag(htmltag tag) In this method you should add the given tag to the end of your validator's queue. If the tag passed is null, you should throw an IllegalArgumentException. public Queue<HtmlTag> gettags() In this method you should return your validator's queue of HTML tags. The queue contains all tags that were passed to the constructor (if any) in their proper order; it should also reflect any changes made such as adding tags with addtag or removing tags with removeall. public void removeall(string element) In this method you should remove from your validator's queue any tags that match the given element. For example, if your validator is constructed using the tags from the page shown previously and removeall("p")were called on it, your queue would be modified to contain the following tags. Notice that all <p> and tags have been removed: front [<!doctype>, <!-- -->,,, <title>, </title>, <meta>, <link>,,, <a>, </a>, <img>, </body>, ] back If the element passed does not exactly match any tags (such as an empty string), your queue should not be modified. You may not use any auxiliary collections such as extra stacks or queues, though you can create simple variables. If the element passed is null, you should throw an IllegalArgumentException. public void validate() In this method you should print an indented text representation of the HTML tags in your queue. Display each tag on its own line. Every opening tag that requires a closing tag increases the level of indentation of following tags by four spaces until its closing tag is reached. The output for the HTML file on the first page would be: (continued on next page) <!doctype> <!-- --> <title> </title> <meta> <link> <p> <a> </a> <p> <img> </body> 2 of 5
3 To generate the output, analyze your queue of tags with a Stack. The basic idea of the algorithm is that when you see an opening tag that is not self-closing, you should push it onto a stack and increase your indentation. When you see a closing tag, you should pop the top element from the stack and decrease your indentation. You may use a single temporary Stack (in addition to your validator's queue of tags) to compute the result. You may not use any other collections, arrays, etc., though you can create as many simple variables as you like. You will also handle errors as described below. Error Handling: Your validate method should print error messages if you encounter either of the following conditions in the HTML: A closing tag that does not match the most recently opened tag (or if there are no open tags at that point). Reaching the end of the HTML input with any tags still open that were not properly closed. For example, the following HTML is valid: <p><b>bold text <i>bold and italic text</i> just bold again</b> <br/> more But the following HTML is not valid, because the </b> appears before the </i>: <p><b> bold text <i>bold and italic text</b> just italic</i> neither The following HTML is also not valid, because the tag is never closed: <b><i>bold italic</i></b> normal text</body> Suppose the previous short HTML file were modified to add several errors, as follows: an added unwanted a deleted </title> tag, an added second tag, an added </br> tag and a deleted </body> tag: <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- This is a comment --> <title>turtles are cool <meta http-equiv="content-type" content="text/html"> <link href="style.css" type="text/css" rel="stylesheet" /> <p>turtles swim in the <a href=" </br> <p>some turtles are over 100 years old. Here is a picture of a turtle: <img src="images/turtle.jpg" width="100" height="100"> The resulting output for this invalid file should be the following: <!doctype> <!-- --> <title> <meta> <link> ERROR unexpected tag: ERROR unexpected tag: <p> <a> </a> ERROR unexpected tag: </br> <p> <img> ERROR unexpected tag: ERROR unclosed tag: ERROR unclosed tag: <title> ERROR unclosed tag: ERROR unclosed tag: The reason that there are two error messages for are because neither tag seen matches the most recently opened tag at the time, which is <title>. The four unclosed tags at the end represent the fact that those four tags didn't have a closing tag in the right place (or, in some cases, no closing tag at all). The tag </br> is unexpected because <br> is self-closing (that is, isselfclosing() returns true when called on any HtmlTag object representing a br tag. See below for HtmlTag). Self-closing tags are always opening tags. Because of the simplicity of our algorithm, a single mistake in the HTML can result in multiple error messages. Near the end of the file is a tag, but this is not expected because body, title, and head were never closed. So the 3 of 5
4 algorithm prints many errors, such as saying that the html tag is unclosed, though the underlying problem is that the body tag was never closed. Also notice that an unexpected closing tag does not change the indentation level of the output. Your complete validation algorithm: Examine each tag from the queue, and if it is an opening tag that requires a closing tag, push it onto a stack and increase indentation. If it is a closing tag, compare it to the tag on top of the stack. If the two tags match, pop the top tag of the stack and decrease indentation. If they don't match, it is an error. Any tags remaining on the stack at the end are errors. Provided Files: HtmlTag.java: Objects that represent HTML tags for you to process. ValidatorMain.java: A basic testing program to run your HtmlValidator code An HtmlTag object corresponds to an HTML tag such as <p> or </table>. You don't ever need to construct HtmlTag objects in your code, but you will process them from your queue. Each object has the following methods: public String getelement() Returns this HTML tag's element name, such as "table". public boolean isopentag() Returns true if this tag is an opening tag, such as <p> or <b>. Self-closing tags like <br /> will return true as well. public boolean isselfclosing() Returns true if this element does not require a closing tag, which is the case for elements such as br and img. public boolean matches(htmltag other) Returns true if this tag and the given tag have the same element but opposite types, such as and </body>. public String tostring() Returns a string representation of this HTML tag, such as "<p>" or "</table>". Some students have confusion about the difference between an HtmlTag object and a String. An HtmlTag is related to a String in that it stores an element as a String inside of it; and in that a tag has a natural representation as a String by surrounding its element with < and > brackets. But the HtmlTag object is more useful than a bare String in that it has the methods above. So you can ask it if it is an opening tag, whether it matches another tag, etc. without needing to manually trim away < and > characters. "<p>hi, how are you?" HtmlTag element: "p" isopentag: true isselfclosing: false matches true HtmlTag element: "p" isopentag: false isselfclosing: false It may seem like a chore to have to figure out how HtmlTag objects work, when Strings are more familiar. But part of becoming a mature software developer is becoming comfortable with pre-written code that is provided to you by others, and using it to solve part of a larger overall task. 4 of 5
5 Development Strategy and Hints: We suggest the following development strategy for solving this program: 1. Create the class and declare method stubs (full header but blank body). If necessary, return a "dummy" value like null or 0. Get your code to run in the ValidatorMain program, though the output will be incorrect. 2. Implement the bodies of the constructors, gettags, and add methods. Verify them in the testing program. 3. Write the removeall method. 4. Write an initial version of the validate algorithm described previously that assumes the page is valid and does not worry about errors. Get the overall algorithm, output, and indentation working for valid HTML. 5. Add the validate code that looks for errors and prints appropriate error messages, as described previously. You can test the output of your validator by running it on various inputs in the ValidatorMain client. You can also use our Output Comparison Tool to see that your outputs match what is expected. null: Some students have trouble understanding the directions related to null on this assignment. The value null is a special value that indicates the lack of an object; a reference that does not refer to any object. When a given method's spec says, "if foo is null, do X," it means that you should test: if (foo == null) { X }. In particular, a null queue is not the same as an empty queue; a null string is not the same as the empty string, "" ; and a null HtmlTag is not the same as an HtmlTag with a null element (which will not occur anyway, since HtmlTag throws an exception if you try to create one with a null element). The validate method is the toughest. It can be hard to handle all of the errors properly and to get the indentation just right. Remember that the indentation increases when an opening tag is seen, and the indentation decreases when a valid expected closing tag is seen. Those should be the only two times you ever need to adjust your indentation. Some students also have trouble with removeall. Recall that there are common stack/queue bugs related to looping over a stack or queue whose contents and/or size are being changed during the loop. See the textbook appendix on stacks and queues posted on the class web site for ideas about how to avoid these bugs. Style Guidelines and Grading: Part of your grade will come from appropriately using stacks and queues. You may only use the size, isempty, add, remove and peek methods for queues. For stacks, you may only use the size, isempty, pop, push and peek methods. You may not call any Stack methods that accept index parameters. You may not examine a stack/queue using a "for each" loop or iterator. Do not make unnecessary or redundant extra passes over a queue when the answer could be computed with fewer passes. Declare queues as variables of type Queue, not variables of type LinkedList (on the left side of the equals sign). Redundancy is always a major grading focus; avoid redundancy and repeated logic as much as possible in your code. Properly encapsulate your objects by making fields private. Avoid unnecessary fields; use fields to store important data of your objects but not to store temporary values only used within a single method. Initialize fields in constructors only. Follow good general style guidelines such as: appropriately using control structures like loops and if/else statements; avoiding redundancy using techniques such as methods, loops, and if/else factoring; properly using indentation, good variable names, and proper types; and not having any lines of code longer than 100 characters. Comment descriptively at the top of your class, each method, and on complex sections of your code. Comments should explain each method's behavior, parameters, return, pre/post-conditions, and any exceptions thrown. Write descriptive comments that explain error cases, and details of the behavior that would be important to the client (What does it do if the tag is not found? Where does it add the tag? What happens if it is null? Etc.). Your comments should be written in your own words and not taken verbatim from this document. 5 of 5
HTML Basics(w3schools.com, 2013)
HTML Basics(w3schools.com, 2013) What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language. HTML is a markup language A markup language is a set of markup tags.
HTML, CSS, XML, and XSL
APPENDIX C HTML, CSS, XML, and XSL T his appendix is a very brief introduction to two markup languages and their style counterparts. The appendix is intended to give a high-level introduction to these
Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University
Web Design Basics Cindy Royal, Ph.D. Associate Professor Texas State University HTML and CSS HTML stands for Hypertext Markup Language. It is the main language of the Web. While there are other languages
Short notes on webpage programming languages
Short notes on webpage programming languages What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is a markup language A markup language is a set of
With tags you can create italic or bold characters, and can control the color and size of the lettering.
HTML TUTORIAL TO UPDATE YOUR WEBSITE What Is a Tag? A tag is a method of formatting HTML documents. With tags you can create italic or bold characters, and can control the color and size of the lettering.
Basic Website Maintenance Tutorial*
Basic Website Maintenance Tutorial* Introduction You finally have your business online! This tutorial will teach you the basics you need to know to keep your site updated and working properly. It is important
CSE 3. Marking Up with HTML. Tags for Bold, Italic, and underline. Structuring Documents. An HTML Web Page File
CSE 3 Comics Updates Shortcut(s)/Tip(s) of the Day Google Earth/Google Maps ssh Anti-Spyware Chapter 4: Marking Up With HTML: A Hypertext Markup Language Primer Fluency with Information Technology Third
So we're set? Have your text-editor ready. Be sure you use NotePad, NOT Word or even WordPad. Great, let's get going.
Web Design 1A First Website Intro to Basic HTML So we're set? Have your text-editor ready. Be sure you use NotePad, NOT Word or even WordPad. Great, let's get going. Ok, let's just go through the steps
Chapter 2 HTML Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D
Chapter 2 HTML Basics Key Concepts Copyright 2013 Terry Ann Morris, Ed.D 1 First Web Page an opening tag... page info goes here a closing tag Head & Body Sections Head Section
Last not not Last Last Next! Next! Line Line Forms Forms Here Here Last In, First Out Last In, First Out not Last Next! Call stack: Worst line ever!
ECE 551 C++ Programming, Data structures, and Algorithms Abstract Data Type: Stack Last In First Out (LIFO) 1 2 2 1 4 3 1 3 4 Stacks in Programming Worst line ever! 5 3 1 5 Stacks are not useful for waiting
Stacks. Stacks (and Queues) Stacks. q Stack: what is it? q ADT. q Applications. q Implementation(s) CSCU9A3 1
Stacks (and Queues) 1 Stacks Stack: what is it? ADT Applications Implementation(s) 2 CSCU9A3 1 Stacks and ueues A stack is a very important data structure in computing science. A stack is a seuence of
LAB MANUAL CS-322364(22): Web Technology
RUNGTA COLLEGE OF ENGINEERING & TECHNOLOGY (Approved by AICTE, New Delhi & Affiliated to CSVTU, Bhilai) Kohka Kurud Road Bhilai [C.G.] LAB MANUAL CS-322364(22): Web Technology Department of COMPUTER SCIENCE
Creating your personal website. Installing necessary programs Creating a website Publishing a website
Creating your personal website Installing necessary programs Creating a website Publishing a website The objective of these instructions is to aid in the production of a personal website published on
Web Design Revision. AQA AS-Level Computing COMP2. 39 minutes. 39 marks. Page 1 of 17
Web Design Revision AQA AS-Level Computing COMP2 204 39 minutes 39 marks Page of 7 Q. (a) (i) What does HTML stand for?... () (ii) What does CSS stand for?... () (b) Figure shows a web page that has been
Interaction between browser and server. HTML (Hyper Text Markup Language)
Interaction between browser and server The client/server model is a computing model that acts as a distributed application which partitions tasks or workloads between the providers of a resource or service,
Introduction to XHTML. 2010, Robert K. Moniot 1
Chapter 4 Introduction to XHTML 2010, Robert K. Moniot 1 OBJECTIVES In this chapter, you will learn: Characteristics of XHTML vs. older HTML. How to write XHTML to create web pages: Controlling document
The Web Web page Links 16-3
Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Write basic HTML documents Describe several specific HTML tags and their purposes 16-1 Chapter Goals
Create Webpages using HTML and CSS
KS2 Create Webpages using HTML and CSS 1 Contents Learning Objectives... 3 What is HTML and CSS?... 4 The heading can improve Search Engine results... 4 E-safety Webpage... 5 Creating a Webpage... 6 Creating
An Attribute is a special word used inside tag to specify additional information to tag such as color, alignment etc.
CHAPTER 10 HTML-I BASIC HTML ELEMENTS HTML (Hyper Text Markup Language) is a document-layout and hyperlink-specification language i.e., a language used to design the layout of a document and to specify
ICT 6012: Web Programming
ICT 6012: Web Programming Covers HTML, PHP Programming and JavaScript Covers in 13 lectures a lecture plan is supplied. Please note that there are some extra classes and some cancelled classes Mid-Term
BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS COPYRIGHT 2013 TERRY ANN MORRIS, ED.D
BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS COPYRIGHT 2013 TERRY ANN MORRIS, ED.D 1 LEARNING OUTCOMES Describe the anatomy of a web page Format the body of a web page with block-level elements
ICE: HTML, CSS, and Validation
ICE: HTML, CSS, and Validation Formatting a Recipe NAME: Overview Today you will be given an existing HTML page that already has significant content, in this case, a recipe. Your tasks are to: mark it
About webpage creation
About webpage creation Introduction HTML stands for HyperText Markup Language. It is the predominant markup language for Web=ages. > markup language is a modern system for annota?ng a text in a way that
Outline. Computer Science 331. Stack ADT. Definition of a Stack ADT. Stacks. Parenthesis Matching. Mike Jacobson
Outline Computer Science 1 Stacks Mike Jacobson Department of Computer Science University of Calgary Lecture #12 1 2 Applications Array-Based Linked List-Based 4 Additional Information Mike Jacobson (University
How to Manage Your Eservice Center Knowledge Base
Populating and Maintaining your eservice Center Knowledge Base Table of Contents Populating and Maintaining the eservice Center Knowledge Base...2 Key Terms...2 Setting up the Knowledge Base...3 Consider
Chapter 8: Bags and Sets
Chapter 8: Bags and Sets In the stack and the queue abstractions, the order that elements are placed into the container is important, because the order elements are removed is related to the order in which
Formatting Text in Blackboard
Formatting Text in Blackboard If you want to spice up your blackboard announcements with different color of the text, bolded text, italicized text, lists, tables and images you can do so by typing HTML
HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout
CALIFORNIA STATE UNIVERSITY, LOS ANGELES INFORMATION TECHNOLOGY SERVICES HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout Fall 2011, Version 1.0 Table of Contents Introduction...3 Downloading
Lab 4.4 Secret Messages: Indexing, Arrays, and Iteration
Lab 4.4 Secret Messages: Indexing, Arrays, and Iteration This JavaScript lab (the last of the series) focuses on indexing, arrays, and iteration, but it also provides another context for practicing with
JavaScript: Control Statements I
1 7 JavaScript: Control Statements I 7.1 Introduction 2 The techniques you will learn here are applicable to most high-level languages, including JavaScript 1 7.2 Algorithms 3 Any computable problem can
Script Handbook for Interactive Scientific Website Building
Script Handbook for Interactive Scientific Website Building Version: 173205 Released: March 25, 2014 Chung-Lin Shan Contents 1 Basic Structures 1 11 Preparation 2 12 form 4 13 switch for the further step
Software Engineering Techniques
Software Engineering Techniques Low level design issues for programming-in-the-large. Software Quality Design by contract Pre- and post conditions Class invariants Ten do Ten do nots Another type of summary
PA2: Word Cloud (100 Points)
PA2: Word Cloud (100 Points) Due: 11:59pm, Thursday, April 16th Overview You will create a program to read in a text file and output the most frequent and unique words by using an ArrayList. Setup In all
This lecture. Abstract data types Stacks Queues. ADTs, Stacks, Queues 1. 2004 Goodrich, Tamassia
This lecture Abstract data types Stacks Queues ADTs, Stacks, Queues 1 Abstract Data Types (ADTs) An abstract data type (ADT) is an abstraction of a data structure An ADT specifies: Data stored Operations
The CDS-ISIS Formatting Language Made Easy
The CDS-ISIS Formatting Language Made Easy Introduction The most complex aspect of CDS-ISIS is the formatting language, used to display, sort, print and download records. The formatting language is very
Making Content Editable. Create re-usable email templates with total control over the sections you can (and more importantly can't) change.
Making Content Editable Create re-usable email templates with total control over the sections you can (and more importantly can't) change. Single Line Outputs a string you can modify in the
Creating HTML authored webpages using a text editor
GRC 175 Assignment 1 Creating HTML authored webpages using a text editor Tasks: 1. Acquire web host space with ad free provider 2. Create an index webpage (index.html) 3. Create a class management webpage
Web Design with Dreamweaver Lesson 4 Handout
Web Design with Dreamweaver Lesson 4 Handout What we learned Create hyperlinks to external websites Links can be made to open in a new browser window Email links can be inserted onto webpages. When the
Introduction to Web Design Curriculum Sample
Introduction to Web Design Curriculum Sample Thank you for evaluating our curriculum pack for your school! We have assembled what we believe to be the finest collection of materials anywhere to teach basic
JavaScript: Introduction to Scripting. 2008 Pearson Education, Inc. All rights reserved.
1 6 JavaScript: Introduction to Scripting 2 Comment is free, but facts are sacred. C. P. Scott The creditor hath a better memory than the debtor. James Howell When faced with a decision, I always ask,
Caldes CM12: Content Management Software Introduction v1.9
Caldes CM12: Content Management Software Introduction v1.9 Enterprise Version: If you are using Express, please contact us. Background Information This manual assumes that you have some basic knowledge
Stacks. Linear data structures
Stacks Linear data structures Collection of components that can be arranged as a straight line Data structure grows or shrinks as we add or remove objects ADTs provide an abstract layer for various operations
Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates
Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates What is a DIV tag? First, let s recall that HTML is a markup language. Markup provides structure and order to a page. For example,
Using an external style sheet with Dreamweaver (CS6)
Using an external style sheet with Dreamweaver (CS6) nigelbuckner.com 2012 This handout explains how to create an external style sheet, the purpose of selector types and how to create styles. It does not
Analysis of a Search Algorithm
CSE 326 Lecture 4: Lists and Stacks 1. Agfgd 2. Dgsdsfd 3. Hdffdsf 4. Sdfgsfdg 5. Tefsdgass We will review: Analysis: Searching a sorted array (from last time) List ADT: Insert, Delete, Find, First, Kth,
Course: Programming II - Abstract Data Types. The ADT Stack. A stack. The ADT Stack and Recursion Slide Number 1
Definition Course: Programming II - Abstract Data Types The ADT Stack The ADT Stack is a linear sequence of an arbitrary number of items, together with access procedures. The access procedures permit insertions
Algorithms and Data S tructures Structures Stack, Queues, and Applications Applications Ulf Leser
Algorithms and Data Structures Stack, Queues, and Applications Ulf Leser Content of this Lecture Stacks and Queues Tree Traversal Towers of Hanoi Ulf Leser: Alg&DS, Summer semester 2011 2 Stacks and Queues
Advanced Drupal Features and Techniques
Advanced Drupal Features and Techniques Mount Holyoke College Office of Communications and Marketing 04/2/15 This MHC Drupal Manual contains proprietary information. It is the express property of Mount
COMP 110 Prasun Dewan 1
COMP 110 Prasun Dewan 1 12. Conditionals Real-life algorithms seldom do the same thing each time they are executed. For instance, our plan for studying this chapter may be to read it in the park, if it
AppendixA1A1. Java Language Coding Guidelines. A1.1 Introduction
AppendixA1A1 Java Language Coding Guidelines A1.1 Introduction This coding style guide is a simplified version of one that has been used with good success both in industrial practice and for college courses.
Chapter 8 More on Links, Layout, and Mobile Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D
Chapter 8 More on Links, Layout, and Mobile Key Concepts Copyright 2013 Terry Ann Morris, Ed.D 1 Learning Outcomes Code relative hyperlinks to web pages in folders within a website Configure a hyperlink
ITNP43: HTML Lecture 4
ITNP43: HTML Lecture 4 1 Style versus Content HTML purists insist that style should be separate from content and structure HTML was only designed to specify the structure and content of a document Style
A binary search tree or BST is a binary tree that is either empty or in which the data element of each node has a key, and:
Binary Search Trees 1 The general binary tree shown in the previous chapter is not terribly useful in practice. The chief use of binary trees is for providing rapid access to data (indexing, if you will)
Inside the Java Virtual Machine
CS1Bh Practical 2 Inside the Java Virtual Machine This is an individual practical exercise which requires you to submit some files electronically. A system which measures software similarity will be used
Lab 1.3 Basic HTML. Vocabulary. Discussion and Procedure
Lab 1.3 Basic HTML The World Wide Web (commonly just called the web ) is an enormous and rapidly growing collection of documents stored on computers all around the world connected by the Internet. In addition
New Perspectives on Creating Web Pages with HTML. Considerations for Text and Graphical Tables. A Graphical Table. Using Fixed-Width Fonts
A Text Table New Perspectives on Creating Web Pages with HTML This figure shows a text table. Tutorial 4: Designing a Web Page with Tables 1 2 A Graphical Table Considerations for Text and Graphical Tables
How to Create an HTML Page
This is a step-by-step guide for creating a sample webpage. Once you have the page set up, you can add and customize your content using the various tags. To work on your webpage, you will need to access
Universidad Carlos III de Madrid
Universidad Carlos III de Madrid Algorithms and Data Structures (ADS) Bachelor in Informatics Engineering Computer Science Department Lists, Stacks and Queues. Authors: Isabel Segura Bedmar April 2011
EUROPEAN COMPUTER DRIVING LICENCE / INTERNATIONAL COMPUTER DRIVING LICENCE WEB EDITING
EUROPEAN COMPUTER DRIVING LICENCE / INTERNATIONAL COMPUTER DRIVING LICENCE WEB EDITING The European Computer Driving Licence Foundation Ltd. Portview House Thorncastle Street Dublin 4 Ireland Tel: + 353
Chapter 3: Restricted Structures Page 1
Chapter 3: Restricted Structures Page 1 1 2 3 4 5 6 7 8 9 10 Restricted Structures Chapter 3 Overview Of Restricted Structures The two most commonly used restricted structures are Stack and Queue Both
CS 241 Data Organization Coding Standards
CS 241 Data Organization Coding Standards Brooke Chenoweth University of New Mexico Spring 2016 CS-241 Coding Standards All projects and labs must follow the great and hallowed CS-241 coding standards.
Common Data Structures
Data Structures 1 Common Data Structures Arrays (single and multiple dimensional) Linked Lists Stacks Queues Trees Graphs You should already be familiar with arrays, so they will not be discussed. Trees
How to code, test, and validate a web page
Chapter 2 How to code, test, and validate a web page Slide 1 Objectives Applied 1. Use a text editor like Aptana Studio 3 to create and edit HTML and CSS files. 2. Test an HTML document that s stored on
Data Integration through XML/XSLT. Presenter: Xin Gu
Data Integration through XML/XSLT Presenter: Xin Gu q7.jar op.xsl goalmodel.q7 goalmodel.xml q7.xsl help, hurt GUI +, -, ++, -- goalmodel.op.xml merge.xsl goalmodel.input.xml profile.xml Goal model configurator
Building a Multi-Threaded Web Server
Building a Multi-Threaded Web Server In this lab we will develop a Web server in two steps. In the end, you will have built a multi-threaded Web server that is capable of processing multiple simultaneous
WIRIS quizzes web services Getting started with PHP and Java
WIRIS quizzes web services Getting started with PHP and Java Document Release: 1.3 2011 march, Maths for More www.wiris.com Summary This document provides client examples for PHP and Java. Contents WIRIS
CompSci-61B, Data Structures Final Exam
Your Name: CompSci-61B, Data Structures Final Exam Your 8-digit Student ID: Your CS61B Class Account Login: This is a final test for mastery of the material covered in our labs, lectures, and readings.
Interspire Website Publisher Developer Documentation. Template Customization Guide
Interspire Website Publisher Developer Documentation Template Customization Guide Table of Contents Introduction... 1 Template Directory Structure... 2 The Style Guide File... 4 Blocks... 4 What are blocks?...
DATA STRUCTURE - STACK
DATA STRUCTURE - STACK http://www.tutorialspoint.com/data_structures_algorithms/stack_algorithm.htm Copyright tutorialspoint.com A stack is an abstract data type ADT, commonly used in most programming
HW3: Programming with stacks
HW3: Programming with stacks Due: 12PM, Noon Thursday, September 18 Total: 20pts You may do this assignment with one other student. A team of two members must practice pair programming. Pair programming
CS 2112 Spring 2014. 0 Instructions. Assignment 3 Data Structures and Web Filtering. 0.1 Grading. 0.2 Partners. 0.3 Restrictions
CS 2112 Spring 2014 Assignment 3 Data Structures and Web Filtering Due: March 4, 2014 11:59 PM Implementing spam blacklists and web filters requires matching candidate domain names and URLs very rapidly
JavaScript Introduction
JavaScript Introduction JavaScript is the world's most popular programming language. It is the language for HTML, for the web, for servers, PCs, laptops, tablets, phones, and more. JavaScript is a Scripting
Data Structures Using C++ 2E. Chapter 5 Linked Lists
Data Structures Using C++ 2E Chapter 5 Linked Lists Doubly Linked Lists Traversed in either direction Typical operations Initialize the list Destroy the list Determine if list empty Search list for a given
Web Building Blocks. Joseph Gilbert User Experience Web Developer University of Virginia Library joe.gilbert@virginia.
Web Building Blocks Core Concepts for HTML & CSS Joseph Gilbert User Experience Web Developer University of Virginia Library [email protected] @joegilbert Why Learn the Building Blocks? The idea
CmpSci 187: Programming with Data Structures Spring 2015
CmpSci 187: Programming with Data Structures Spring 2015 Lecture #12 John Ridgway March 10, 2015 1 Implementations of Queues 1.1 Linked Queues A Linked Queue Implementing a queue with a linked list is
JISIS and Web Technologies
27 November 2012 Status: Draft Author: Jean-Claude Dauphin JISIS and Web Technologies I. Introduction This document does aspire to explain how J-ISIS is related to Web technologies and how to use J-ISIS
7 th Grade Web Design Name: Project 1 Rubric Personal Web Page
7 th Grade Web Design Name: Project 1 Rubric Personal Web Page Date: Grade : 100 points total A+ 100-96 Challenge Assignment A 95-90 B 89-80 C 79-70 D 69-60 Goals You will be creating a personal web page
04 Links & Images. 1 The Anchor Tag. 1.1 Hyperlinks
One of the greatest strengths of Hypertext Markup Language is hypertext the ability to link documents together. The World Wide Web itself consists of millions of html documents all linked together via
Sequential Data Structures
Sequential Data Structures In this lecture we introduce the basic data structures for storing sequences of objects. These data structures are based on arrays and linked lists, which you met in first year
Create a report with formatting, headings, page numbers and table of contents
Create a report with formatting, headings, numbers and table of contents MS Office Word 2010 Combine this model with instructions from your teacher and your report will be something you can be proud of.
SQL Server Database Coding Standards and Guidelines
SQL Server Database Coding Standards and Guidelines http://www.sqlauthority.com Naming Tables: Stored Procs: Triggers: Indexes: Primary Keys: Foreign Keys: Defaults: Columns: General Rules: Rules: Pascal
JavaScript Basics & HTML DOM. Sang Shin Java Technology Architect Sun Microsystems, Inc. [email protected] www.javapassion.com
JavaScript Basics & HTML DOM Sang Shin Java Technology Architect Sun Microsystems, Inc. [email protected] www.javapassion.com 2 Disclaimer & Acknowledgments Even though Sang Shin is a full-time employee
HTML. A computer network is a collection of computers linked through cables or wireless means.
What is a computer network? HTML A computer network is a collection of computers linked through cables or wireless means. What is Internet? Internet is a network of computers of different sizes and configurations
DATA STRUCTURE - QUEUE
DATA STRUCTURE - QUEUE http://www.tutorialspoint.com/data_structures_algorithms/dsa_queue.htm Copyright tutorialspoint.com Queue is an abstract data structure, somewhat similar to stack. In contrast to
Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.
Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to
1 Description of The Simpletron
Simulating The Simpletron Computer 50 points 1 Description of The Simpletron In this assignment you will write a program to simulate a fictional computer that we will call the Simpletron. As its name implies
Introduction to Programming System Design. CSCI 455x (4 Units)
Introduction to Programming System Design CSCI 455x (4 Units) Description This course covers programming in Java and C++. Topics include review of basic programming concepts such as control structures,
Using Style Sheets for Consistency
Cascading Style Sheets enable you to easily maintain a consistent look across all the pages of a web site. In addition, they extend the power of HTML. For example, style sheets permit specifying point
Creating a table of contents quickly in Word
Creating a table of contents quickly in Word This note shows you how to set up a table of contents that can be generated and updated quickly and easily, even for the longest and most complex documents.
Specialized Programme on Web Application Development using Open Source Tools
Specialized Programme on Web Application Development using Open Source Tools Objective: At the end of the course, Students will be able to: Understand various open source tools(programming tools and databases)
AJAX The Future of Web Development?
AJAX The Future of Web Development? Anders Moberg (dit02amg), David Mörtsell (dit01dml) and David Södermark (dv02sdd). Assignment 2 in New Media D, Department of Computing Science, Umeå University. 2006-04-28
Computer Programming In QBasic
Computer Programming In QBasic Name: Class ID. Computer# Introduction You've probably used computers to play games, and to write reports for school. It's a lot more fun to create your own games to play
