<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.lensovet.net/~sysadmin/w/index.php?action=history&amp;feed=atom&amp;title=Computer_Science%2F61b%2FHomework%2Fhw4</id>
	<title>Computer Science/61b/Homework/hw4 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.lensovet.net/~sysadmin/w/index.php?action=history&amp;feed=atom&amp;title=Computer_Science%2F61b%2FHomework%2Fhw4"/>
	<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Homework/hw4&amp;action=history"/>
	<updated>2026-05-03T04:34:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Homework/hw4&amp;diff=24313&amp;oldid=prev</id>
		<title>Lensovet: Lensovet moved page CS/61b/Homework/hw4 to Computer Science/61b/Homework/hw4</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Homework/hw4&amp;diff=24313&amp;oldid=prev"/>
		<updated>2023-02-20T03:51:34Z</updated>

		<summary type="html">&lt;p&gt;Lensovet moved page &lt;a href=&quot;/~sysadmin/w/CS/61b/Homework/hw4&quot; class=&quot;mw-redirect&quot; title=&quot;CS/61b/Homework/hw4&quot;&gt;CS/61b/Homework/hw4&lt;/a&gt; to &lt;a href=&quot;/~sysadmin/w/Computer_Science/61b/Homework/hw4&quot; title=&quot;Computer Science/61b/Homework/hw4&quot;&gt;Computer Science/61b/Homework/hw4&lt;/a&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 03:51, 20 February 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Lensovet</name></author>
		
	</entry>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Homework/hw4&amp;diff=4001&amp;oldid=prev</id>
		<title>Lensovet: moved CS 61b/Homework/hw4 to CS/61b/Homework/hw4:&amp;#32;fix cs 61b hierarchy</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Homework/hw4&amp;diff=4001&amp;oldid=prev"/>
		<updated>2010-11-14T06:00:19Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/~sysadmin/w/CS_61b/Homework/hw4&quot; class=&quot;mw-redirect&quot; title=&quot;CS 61b/Homework/hw4&quot;&gt;CS 61b/Homework/hw4&lt;/a&gt; to &lt;a href=&quot;/~sysadmin/w/CS/61b/Homework/hw4&quot; class=&quot;mw-redirect&quot; title=&quot;CS/61b/Homework/hw4&quot;&gt;CS/61b/Homework/hw4&lt;/a&gt;: fix cs 61b hierarchy&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 06:00, 14 November 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Lensovet</name></author>
		
	</entry>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Homework/hw4&amp;diff=2963&amp;oldid=prev</id>
		<title>Lensovet: /* Grade */ note lock fix</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Homework/hw4&amp;diff=2963&amp;oldid=prev"/>
		<updated>2007-05-22T19:48:35Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Grade: &lt;/span&gt; note lock fix&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 19:48, 22 May 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot; &gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Grade==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Grade==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;9/10: test cases failed for Lock&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;9/10: test cases failed for Lock &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;– ''fixed in published code''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Description==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Description==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lensovet</name></author>
		
	</entry>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Homework/hw4&amp;diff=2871&amp;oldid=prev</id>
		<title>Lensovet: /* Part I  (6 points) */ fix link</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Homework/hw4&amp;diff=2871&amp;oldid=prev"/>
		<updated>2007-04-26T22:00:51Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Part I  (6 points): &lt;/span&gt; fix link&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 22:00, 26 April 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot; &gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Part I&amp;#160; (6 points)===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Part I&amp;#160; (6 points)===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[list/DList.java|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;/&lt;/del&gt;list/DList.java]] contains a skeleton of a doubly-linked list class.&amp;#160; Fill in the&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/&lt;/ins&gt;list/DList.java|list/DList.java]] contains a skeleton of a doubly-linked list class.&amp;#160; Fill in the&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;method implementations.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;method implementations.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lensovet</name></author>
		
	</entry>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Homework/hw4&amp;diff=2870&amp;oldid=prev</id>
		<title>Lensovet: /* Part I  (6 points) */ link to file</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Homework/hw4&amp;diff=2870&amp;oldid=prev"/>
		<updated>2007-04-26T22:00:32Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Part I  (6 points): &lt;/span&gt; link to file&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 22:00, 26 April 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot; &gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Part I&amp;#160; (6 points)===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Part I&amp;#160; (6 points)===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;list/DList.java contains a skeleton of a doubly-linked list class.&amp;#160; Fill in the&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[&lt;/ins&gt;list/DList.java&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|/list/DList.java]] &lt;/ins&gt;contains a skeleton of a doubly-linked list class.&amp;#160; Fill in the&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;method implementations.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;method implementations.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lensovet</name></author>
		
	</entry>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Homework/hw4&amp;diff=2284&amp;oldid=prev</id>
		<title>Lensovet at 08:42, 11 December 2006</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=Computer_Science/61b/Homework/hw4&amp;diff=2284&amp;oldid=prev"/>
		<updated>2006-12-11T08:42:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Files==&lt;br /&gt;
*[[/list]] package&lt;br /&gt;
&lt;br /&gt;
==Grade==&lt;br /&gt;
9/10: test cases failed for Lock&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
                               CS 61B Homework 4&lt;br /&gt;
                        Due 4pm Friday, October 6, 2006&lt;br /&gt;
&lt;br /&gt;
This homework will give you practice with writing doubly-linked lists and using&lt;br /&gt;
subclasses.  This is an individual assignment; you may not share code with&lt;br /&gt;
other students.&lt;br /&gt;
&lt;br /&gt;
Copy the Homework 4 directory by doing the following, starting from your home&lt;br /&gt;
directory.  Don't forget the &amp;quot;-r&amp;quot; switch in the cp command.&lt;br /&gt;
&lt;br /&gt;
    mkdir hw4&lt;br /&gt;
    cd hw4&lt;br /&gt;
    cp -r $master/hw/hw4/* .&lt;br /&gt;
&lt;br /&gt;
When you did Project 1, you probably noticed that the SList ADT doesn't allow&lt;br /&gt;
you to walk through an SList and process each node as you go.  Either you must&lt;br /&gt;
violate the ADT by manipulating the SListNode pointers directly from your&lt;br /&gt;
RunLengthEncoding class, or you must use the slow nth() method to access each&lt;br /&gt;
successive element, thereby obtaining a toOcean() method that runs in time&lt;br /&gt;
proportional to N^2, where N is the size of the list.  Because we didn't know&lt;br /&gt;
about Java packages, we were unable to develop a really satisfying list ADT.&lt;br /&gt;
&lt;br /&gt;
In this homework, you will implement a doubly-linked list ADT that allows an&lt;br /&gt;
application to hold list nodes and hop from node to node quickly.  How do we&lt;br /&gt;
make the list an ADT if applications can get access to list nodes?  It's easy:&lt;br /&gt;
we put all the list code in a package called &amp;quot;list&amp;quot;, and we declare the fields&lt;br /&gt;
of DListNode protected--except the &amp;quot;item&amp;quot; field, which is public.  Applications&lt;br /&gt;
can't access the &amp;quot;prev&amp;quot; or &amp;quot;next&amp;quot; fields of a DListNode, so they can't violate&lt;br /&gt;
any List invariants.&lt;br /&gt;
&lt;br /&gt;
I've chosen to make the &amp;quot;item&amp;quot; field is public because it doesn't take part in&lt;br /&gt;
any invariants, so it does no harm to make it public.  Applications may read&lt;br /&gt;
and change &amp;quot;item&amp;quot; as they please.  In fact, no method is provided for reading&lt;br /&gt;
the &amp;quot;item&amp;quot; field indirectly.&lt;br /&gt;
&lt;br /&gt;
===Part I  (6 points)===&lt;br /&gt;
list/DList.java contains a skeleton of a doubly-linked list class.  Fill in the&lt;br /&gt;
method implementations.&lt;br /&gt;
&lt;br /&gt;
Your DList should be circularly-linked, and its head should be a sentinel node&lt;br /&gt;
(which holds no item) as described in Lecture 8.  An empty DList is signified&lt;br /&gt;
by a sentinel node that points to itself.  Some DList methods return&lt;br /&gt;
DListNodes; they should NEVER return the sentinel under any circumstances.&lt;br /&gt;
Your DList should satisfy the following invariants.&lt;br /&gt;
&lt;br /&gt;
    1)  For any DList d, d.head != null.&lt;br /&gt;
    2)  For any DListNode x in a DList, x.next != null.&lt;br /&gt;
    3)  For any DListNode x in a DList, x.prev != null.&lt;br /&gt;
    4)  For any DListNode x in a DList, if x.next == y, then y.prev == x.&lt;br /&gt;
    5)  For any DListNode x in a DList, if x.prev == y, then y.next == x.&lt;br /&gt;
    6)  For any DList d, the field d.size is the number of DListNodes,&lt;br /&gt;
        NOT COUNTING the sentinel, that can be accessed from the sentinel&lt;br /&gt;
        (d.head) by a sequence of &amp;quot;next&amp;quot; references.&lt;br /&gt;
&lt;br /&gt;
The DList class includes a newNode() method whose sole purpose is to call the&lt;br /&gt;
DListNode constructor.  All of your methods that insert a new node should call&lt;br /&gt;
this method; they should not call the DListNode constructor directly.  This&lt;br /&gt;
will help minimize the number of methods you need to override in Part III.&lt;br /&gt;
&lt;br /&gt;
Do not change any of the method prototypes; as usual, our test code expects you&lt;br /&gt;
to adhere to the interface we provide.  Do not change the fields of DList or&lt;br /&gt;
DListNode.  You may add helper methods as you please.&lt;br /&gt;
&lt;br /&gt;
You are welcome to create a main() method with test code.  It will not be&lt;br /&gt;
graded.  We'll be testing your DList class, so you should too.&lt;br /&gt;
&lt;br /&gt;
A quirk of Java is that you must compile and run your code from outside the&lt;br /&gt;
list/ directory using the following syntax.&lt;br /&gt;
&lt;br /&gt;
  javac -g list/DListNode.java&lt;br /&gt;
  java list.DListNode&lt;br /&gt;
&lt;br /&gt;
===Part II  (1 point)===&lt;br /&gt;
Our ADT is not as well protected as we would like.  There are several ways by&lt;br /&gt;
which a hostile (or stupid) application can corrupt our DList (i.e., make it&lt;br /&gt;
violate an invariant) through method calls alone.  Describe one in a text file&lt;br /&gt;
named GRADER (which will be submitted with your code).&lt;br /&gt;
&lt;br /&gt;
At the top of the GRADER file, include your name and cs61b login ID.&lt;br /&gt;
&lt;br /&gt;
===Part III  (3 points)===&lt;br /&gt;
Implement a &amp;quot;lockable&amp;quot; doubly-linked list ADT:  a list in which any node can be&lt;br /&gt;
&amp;quot;locked.&amp;quot;  A locked node can never be removed from its list.  Any attempt to&lt;br /&gt;
remove a locked node has no effect (not even an error message).  Your locked&lt;br /&gt;
list classes should be in the list package alongside DList and DListNode.&lt;br /&gt;
&lt;br /&gt;
First, define a LockDListNode class that extends DListNode and carries&lt;br /&gt;
information about whether it has been locked.  LockDListNodes are not locked&lt;br /&gt;
when they are first created.  Your LockDListNode constructor(s) should call a&lt;br /&gt;
DListNode constructor to avoid code duplication.&lt;br /&gt;
&lt;br /&gt;
Second, define a LockDList class that extends DList and includes an additional&lt;br /&gt;
method&lt;br /&gt;
&lt;br /&gt;
    public void lockNode(DListNode node) { ... }&lt;br /&gt;
&lt;br /&gt;
that permanently locks &amp;quot;node&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Your LockDList class should override just enough methods to ensure that&lt;br /&gt;
 (1)  LockDListNodes are always used in LockDLists (instead of DListNodes), and&lt;br /&gt;
 (2)  locked nodes cannot be removed from a list.&lt;br /&gt;
&lt;br /&gt;
WARNING:  To override a method, you must write a new method in the subclass&lt;br /&gt;
with EXACTLY the same prototype.  You can't change a parameter's type to a&lt;br /&gt;
subclass.  Overriding won't work if you do that.&lt;br /&gt;
&lt;br /&gt;
Your overriding methods should include calls to the overridden superclass&lt;br /&gt;
methods whenever it makes sense to do so.  Unnecessary code duplication will be&lt;br /&gt;
penalized.&lt;br /&gt;
&lt;br /&gt;
Again, I recommend you test your code.&lt;/div&gt;</summary>
		<author><name>Lensovet</name></author>
		
	</entry>
</feed>