<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hello Thupten &#187; &#187; Academic Works</title>
	<atom:link href="https://www.thupten.feedback/category/academic-works/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.thupten.feedback</link>
	<description>Just another developer&#039;s blog</description>
	<lastBuildDate>Tue, 21 Apr 2026 05:10:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.2</generator>
	<item>
		<title>Splitify &#8211; chrome extension to split a webpage for wide screen</title>
		<link>https://www.thupten.feedback/2013/12/18/splitify-chrome-extension-to-split-a-webpage-for-wide-screen/</link>
		<comments>https://www.thupten.feedback/2013/12/18/splitify-chrome-extension-to-split-a-webpage-for-wide-screen/#respond</comments>
		<pubDate>Wed, 18 Dec 2013 06:59:00 +0000</pubDate>
		<dc:creator><![CDATA[thupten]]></dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[Web Designing and Programming]]></category>

		<guid isPermaLink="false">http://www.hellothupten.com/?p=575</guid>
		<description><![CDATA[I created this chrome extension that splits the webpage that uses the wide screen more effectively. Extract the zip file and install the extension. Chrome > Settings Tick Developer Mode Click &#8216;Load unpacked extension&#8217; Select the folder you extracted the files to. Enjoy Download Splitify This extension does not work on all websites. So enable [&#8230;]]]></description>
				<content:encoded><![CDATA[I created this chrome extension that splits the webpage that uses the wide screen more effectively. 
Extract the zip file and install the extension.
<span id="more-575"></span>
<ul>
<li>Chrome > Settings</li>
<li>Tick Developer Mode</li>
<li>Click &#8216;Load unpacked extension&#8217;</li>
<li>Select the folder you extracted the files to.</li>
<li>Enjoy</li>
</ul>

<a href="http://www.thupten.feedback/wp-content/uploads/splitify.zip">Download Splitify</a>

This extension does not work on all websites. So enable this extension when you need and disable when you don&#8217;t. <img src="https://www.thupten.feedback/wp-includes/images/smilies/simple-smile.png" alt=":)" class="wp-smiley" style="height: 1em; max-height: 1em;" />

<a href="http://www.thupten.feedback/wp-content/uploads/2013/12/news.png"><img src="http://www.thupten.feedback/wp-content/uploads/2013/12/news.png" alt="news" width="1280" height="800" class="alignnone size-full wp-image-576" /></a>



]]></content:encoded>
			<wfw:commentRss>https://www.thupten.feedback/2013/12/18/splitify-chrome-extension-to-split-a-webpage-for-wide-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Game for Flash Programming class</title>
		<link>https://www.thupten.feedback/2011/09/12/flash-game-for-flash-programming-class/</link>
		<comments>https://www.thupten.feedback/2011/09/12/flash-game-for-flash-programming-class/#respond</comments>
		<pubDate>Mon, 12 Sep 2011 13:17:20 +0000</pubDate>
		<dc:creator><![CDATA[thupten]]></dc:creator>
				<category><![CDATA[Academic Works]]></category>
		<category><![CDATA[flash game]]></category>

		<guid isPermaLink="false">http://www.hellothupten.com/?p=790</guid>
		<description><![CDATA[Yes, indeed..flash is dying. But this class was fun. Simon is a good teacher. Ali and I worked together on this project. This game uses OOP for all character and the game. Sorry, we didn&#8217;t put the Mute option for the sound. I did all the graphics in about 3 hours. Ali&#8217;s strong physics knowledge [&#8230;]]]></description>
				<content:encoded><![CDATA[Yes, indeed..flash is dying. But this class was fun. Simon is a good teacher. <a href="http://asa.veryusefulinfo.com">Ali</a> and I worked together on this project. This game uses OOP for all character and the game. Sorry, we didn&#8217;t put the Mute option for the sound. I did all the graphics in about 3 hours. Ali&#8217;s strong physics knowledge was very useful for the dynamics of the arrow in the game.
<br/>
<a href="https://www.dropbox.com/s/0481doiyxigetip/flash_game_src_ali_thupten.zip">Get Source Code</a>.
<br/>
<object width="480px" height="320px" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://asa.veryusefulinfo.com/wp-content/uploads/2010/08/BaseProject2.swf" /><param name="quality" value="high" /><param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" /><embed width="480px" height="320px" type="application/x-shockwave-flash" src="http://asa.veryusefulinfo.com/wp-content/uploads/2010/08/BaseProject2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>]]></content:encoded>
			<wfw:commentRss>https://www.thupten.feedback/2011/09/12/flash-game-for-flash-programming-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Java Minesweeper Game.</title>
		<link>https://www.thupten.feedback/2011/09/12/simple-java-minesweeper-game/</link>
		<comments>https://www.thupten.feedback/2011/09/12/simple-java-minesweeper-game/#respond</comments>
		<pubDate>Mon, 12 Sep 2011 13:16:15 +0000</pubDate>
		<dc:creator><![CDATA[thupten]]></dc:creator>
				<category><![CDATA[Academic Works]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[applet]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[minesweeper]]></category>

		<guid isPermaLink="false">http://www.hellothupten.com/?p=788</guid>
		<description><![CDATA[This was the final assignment for JAC444 at Seneca. Its a simple minesweeper java applet game. Kyle and I worked on this together. I realized team of 2 is better than 1 or 2+. In pair programming, one of the programmer types the codes while the other look over his mistakes and makes sure they [&#8230;]]]></description>
				<content:encoded><![CDATA[This was the final assignment for JAC444 at Seneca. Its a simple minesweeper java applet game. <a href="http://kyle205website.info/wordpress/">Kyle</a> and I worked on this together. I realized team of 2 is better than 1 or 2+. In pair programming, one of the programmer types the codes while the other look over his mistakes and makes sure they are working in right direction. Sort of like rally driving, one person drives while the other gives navigation information. This game could use some improvement for rendering.
<a href="http://thupten.feedback/wp-content/uploads/Minesweeper.rar">Download Source</a>
<br/>
<iframe src="http://thupten.feedback/wp-content/uploads/minesweeper/bin/app.html" width="100%" height="500px"></iframe>]]></content:encoded>
			<wfw:commentRss>https://www.thupten.feedback/2011/09/12/simple-java-minesweeper-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC3 Application Project</title>
		<link>https://www.thupten.feedback/2011/08/12/recruitment-application-project/</link>
		<comments>https://www.thupten.feedback/2011/08/12/recruitment-application-project/#respond</comments>
		<pubDate>Fri, 12 Aug 2011 13:14:28 +0000</pubDate>
		<dc:creator><![CDATA[thupten]]></dc:creator>
				<category><![CDATA[Web Designing and Programming]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[entity framework]]></category>

		<guid isPermaLink="false">http://www.hellothupten.com/?p=786</guid>
		<description><![CDATA[ASP.NET MVC3 Application for a typical recruitment company. The company has many employees who can work for a certain client company. Many to Many relationship between employee and client. The models are made using code first entity framework 4.1 Iteration 1: Model class files completed. Basic site working. Needs Authentication to be added. Iteration 2: [&#8230;]]]></description>
				<content:encoded><![CDATA[ASP.NET MVC3 Application for a typical recruitment company. The company has many employees who can work for a certain client company. Many to Many relationship between employee and client. The models are made using code first entity framework 4.1

<a href="http://thupten.feedback/wp-content/uploads/recruitment_project/Recruitment1.rar">Iteration 1</a>: Model class files completed. Basic site working. Needs Authentication to be added.

<a href="http://thupten.feedback/wp-content/uploads/recruitment_project/Recruitment2-torontoworkforce.zip">Iteration 2</a>: Jquery was added. Some ajax features added. JQueryUI was added to get a thematic look. Jquery full calendar plugin was added to the homepage. I am hosting it on my home server, <a href="http://torontoworkforce.veryusefulinfo.com">torontoworkforce.veryusefulinfo.com</a> for demo purposes. If is down, then probably my computer is shut off or I may have shut the server down temporarily to work on the computer.

<a href="http://thupten.feedback/wp-content/uploads/recruitment_project/TorontoWorkforce.rar">Iteration 3</a>: User authentication added.

<a href="http://thupten.feedback/wp-content/uploads/2012/03/calendar.png"><img class="alignnone size-full wp-image-418" title="calendar" src="http://thupten.feedback/wp-content/uploads/2012/03/calendar.png" alt="" width="580" height="319" /></a>

<a href="http://thupten.feedback/wp-content/uploads/2012/03/list.png"><img class="alignnone size-full wp-image-415" title="list" src="http://thupten.feedback/wp-content/uploads/2012/03/list.png" alt="" width="580" height="319" /></a>

<a href="http://thupten.feedback/wp-content/uploads/2012/03/addline.png"><img class="alignnone size-full wp-image-417" title="addline" src="http://thupten.feedback/wp-content/uploads/2012/03/addline.png" alt="" width="580" height="319" /></a>

<a href="http://thupten.feedback/wp-content/uploads/2012/03/about.png"><img class="alignnone size-full wp-image-416" title="about" src="http://thupten.feedback/wp-content/uploads/2012/03/about.png" alt="" width="580" height="319" /></a>]]></content:encoded>
			<wfw:commentRss>https://www.thupten.feedback/2011/08/12/recruitment-application-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PRJ666 (Project Management)</title>
		<link>https://www.thupten.feedback/2011/08/12/prj666-project-management/</link>
		<comments>https://www.thupten.feedback/2011/08/12/prj666-project-management/#respond</comments>
		<pubDate>Fri, 12 Aug 2011 13:13:53 +0000</pubDate>
		<dc:creator><![CDATA[thupten]]></dc:creator>
				<category><![CDATA[Academic Works]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[Project Planning and Management]]></category>
		<category><![CDATA[academic]]></category>
		<category><![CDATA[ios]]></category>

		<guid isPermaLink="false">http://www.hellothupten.com/?p=782</guid>
		<description><![CDATA[I Developed iOS mobile application for Zymurgy Systems with complete software development cycle as a member of a team of 4 developers. Links to Project Initiative Document, Development, Testing, User Guide.]]></description>
				<content:encoded><![CDATA[I Developed iOS mobile application for Zymurgy Systems with complete software development cycle as a member of a team of 4 developers.
Links to <a href="https://docs.google.com/open?id=0B6qtQZwCfVBgYzllYmUyMmEtN2U0My00MDk4LWJhOTYtODA0ODkzYTE3NDQ4">Project Initiative Document</a>, Development, Testing, <a href="https://docs.google.com/open?id=0B6qtQZwCfVBgekJlbzZQMmFDSjQ">User Guide</a>.
<a href="https://docs.google.com/open?id=0B6qtQZwCfVBgekJlbzZQMmFDSjQ"><img class="alignnone size-full wp-image-308" title="Click to see full user guide of the app" src="http://thupten.feedback/wp-content/uploads/2012/03/iphone_app.png" alt="Click to see full user guide of the app." /></a>]]></content:encoded>
			<wfw:commentRss>https://www.thupten.feedback/2011/08/12/prj666-project-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weather Service with Server and Client..OSGi / Java / Eclipse Class</title>
		<link>https://www.thupten.feedback/2011/06/12/weather-service-with-server-and-client-osgi-java-eclipse-class/</link>
		<comments>https://www.thupten.feedback/2011/06/12/weather-service-with-server-and-client-osgi-java-eclipse-class/#respond</comments>
		<pubDate>Sun, 12 Jun 2011 13:19:11 +0000</pubDate>
		<dc:creator><![CDATA[thupten]]></dc:creator>
				<category><![CDATA[Academic Works]]></category>
		<category><![CDATA[Eclipse ECL500]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java app]]></category>
		<category><![CDATA[weather]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://www.hellothupten.com/?p=794</guid>
		<description><![CDATA[This project was for the Eclipse class. This is a java application. The project contained 2 separate bundles working together. The provider bundle serves the weather service. The client bundle consumes the service provided by the provider and displays the weather information. Project Wiki https://zenit.senecac.on.ca/svn/ecl500_111rep2/trunk/project/]]></description>
				<content:encoded><![CDATA[This project was for the Eclipse class. This is a java application. The project contained 2 separate bundles working together. The provider bundle serves the weather service. The client bundle consumes the service provided by the provider and displays the weather information.
<br/>
<a href="http://thupten.feedback/wp-content/uploads/2012/03/Ecl500_team2-project_output03.png"><img class="alignnone size-medium wp-image-411" title="Ecl500_team2-project_output03" src="http://thupten.feedback/wp-content/uploads/2012/03/Ecl500_team2-project_output03-217x300.png" alt="" width="217" height="300" /></a>
<br/>
<a href="http://zenit.senecac.on.ca/wiki/index.php/Teams_Winter_2011/team2/project">Project Wiki</a><br/>
<a href="https://zenit.senecac.on.ca/svn/ecl500_111rep2/trunk/project/">https://zenit.senecac.on.ca/svn/ecl500_111rep2/trunk/project/</a><br/>]]></content:encoded>
			<wfw:commentRss>https://www.thupten.feedback/2011/06/12/weather-service-with-server-and-client-osgi-java-eclipse-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Services Assignment WSA500</title>
		<link>https://www.thupten.feedback/2011/06/12/web-services-assignment-wsa500/</link>
		<comments>https://www.thupten.feedback/2011/06/12/web-services-assignment-wsa500/#respond</comments>
		<pubDate>Sun, 12 Jun 2011 13:18:17 +0000</pubDate>
		<dc:creator><![CDATA[thupten]]></dc:creator>
				<category><![CDATA[Academic Works]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[wcf]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://www.hellothupten.com/?p=792</guid>
		<description><![CDATA[Deploying your WCF WebHttp Service to the warp server. This project is a visual studio project, uses Entity Framework to access mssql database. Download Source]]></description>
				<content:encoded><![CDATA[Deploying your WCF WebHttp Service to the warp server. This project is a visual studio project, uses Entity Framework to access mssql database.
<br/>
<a href="http://thupten.feedback/wp-content/uploads/assignments/wsa500/a2.zip">Download Source</a>]]></content:encoded>
			<wfw:commentRss>https://www.thupten.feedback/2011/06/12/web-services-assignment-wsa500/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Absolute beginner&#8217;s guide to Eclipse</title>
		<link>https://www.thupten.feedback/2011/02/02/absolute-beginners-guide-to-eclipse/</link>
		<comments>https://www.thupten.feedback/2011/02/02/absolute-beginners-guide-to-eclipse/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 04:04:38 +0000</pubDate>
		<dc:creator><![CDATA[thupten]]></dc:creator>
				<category><![CDATA[Eclipse ECL500]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[eclipse ide]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[junit with eclipse]]></category>

		<guid isPermaLink="false">http://thupten.veryusefulinfo.com/?p=177</guid>
		<description><![CDATA[Following article is a part of my Lab exercise for Eclipse course I am taking during Winter2011. Click here for the java files used to create this tutorial When Eclipse is run, it asks for a workspace location. I will use ./wksp/basics/labs. You can choose to use this workspace by default by ticking the checkbox. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Following article is a part of my Lab exercise for Eclipse course I am taking during Winter2011.</p>

<img class="alignright" title="Eclipse" src="http://upload.wikimedia.org/wikipedia/en/3/34/Eclipse-logo.png" alt="" width="250" height="136" />
<a href="http://thupten.feedback/wp-content/uploads/2011/02/ecl500a24-lab1-practicefiles.jar">Click here for the java files used to create this tutorial</a>

When Eclipse is run, it asks for a workspace location. I will use ./wksp/basics/labs. You can choose to use this workspace by default by ticking the checkbox. Eclipse starts with the Welcome tab. On this window, you can get more information about using Eclipse. Close the Welcome tab.<span id="more-177"></span><!--more-->
<a href="http://thupten.feedback/wp-content/uploads/2011/02/images/001-start.JPG"><img class="style1" style="width: 595px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/001-start.JPG" alt="" /></a>
<h2 style="color: red;">Preparing Eclipse</h2>
Since we will be working with java language we need to set up the JRE for compiling java programs. Select Window-&gt;Preferences to open Preferences dialog. We can setup various options for Eclipse. Choose &#8216;Installed JREs&#8217; to display JREs installed. You can check mark the one you want to use. If none are displayed, you can add by press &#8216;Add&#8230;&#8217; button. If you need to change the size of the font, on the same dialog, Select General-&gt;Colors and Fonts and &#8216;Text Font&#8217;. Click &#8216;Edit&#8230;&#8217; to change the font size to 12.
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/01-Preferences.JPG"><img class="style2" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/01-Preferences.JPG" alt="" /></a>
<a href="http://thupten.feedback/wp-content/uploads/2011/02/images/02-Preferences-font.JPG"><img class="style3" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/02-Preferences-font.JPG" alt="" /></a></p>

<h2 style="color: red;">Creating your first Java project</h2>
<p>There are numerous ways to create a simple java project.</p>
<p>Click File-&gt;New-&gt;Project&#8230;Then select &#8216;Java Project&#8217;. You can also accomplish this by right-clicking on Project Explorer on the left side of Eclipse, and selecting New-&gt;Project&#8230; and select Java Project.<a href="http://thupten.feedback/wp-content/uploads/2011/02/images/03-New-java-project.JPG"><img class="style4" style="width: 500px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/03-New-java-project.JPG" alt="" /></a></p>
<p>Then click Next. Next I will enter a Project Name, &#8216;Lab1&#8242;. Select your JRE environment. Click Next. Eclipse will create a folder for your project with a subfolder &#8216;src&#8217;. Then click Finish.<a href="http://thupten.feedback/wp-content/uploads/2011/02/images/03-New-java-project1.JPG"><img class="style5" style="width: 500px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/03-New-java-project1.JPG" alt="" /></a></p>
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/03-New-java-project2.JPG"><img class="style5" style="width: 500px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/03-New-java-project2.JPG" alt="" /></a></p>

<h2 style="color: red;">Browsing Java elements using the Package Explorer.</h2>
<p>The package explorer displays your java files organized in their packages. Eclipse will create a default package when creating a java class without a package name. You can expand the package names to display the files within by clicking on the &#8216;+&#8217; on the left side of package names. Click on &#8216;-&#8216; to collapse expanded packages.<a href="http://thupten.feedback/wp-content/uploads/2011/02/images/04-packagexplorer.JPG"><img class="style6" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/04-packagexplorer.JPG" alt="" /></a></p>

<h2 style="color: red;">Editing java elements</h2>
<p>To edit a java element that contain text like java classes or properties files, doubleclick the filename, a new window with content of the file opens in the editor in center. You can edit the file and save to make changes.</p>
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/05-editingjavaelements.JPG"><img class="style6" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/05-editingjavaelements.JPG" alt="" /></a></p>

<h2 style="color: red;">Creating a Java class</h2>
<p>Now lets create a java class to make a small program. We will make a class called Calculator.java that contains a Add() method. Right click &#8216;src&#8217; folder on package explorer and click New-&gt;Class. You can achive the same result by selecting File-&gt;New-&gt;Class too. I will class this class &#8216;Calculator&#8217;. Lets give it a package name &#8216;a24.labs.lab1&#8242;. Make sure &#8216;public static void main&#8230;&#8217; is unchecked, I will create another class to create the main method which will use the Calculator class.</p>
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/06-createjavaclass.JPG"><img class="style7" style="border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/06-createjavaclass.JPG" alt="" /></a></p>
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/06-createjavaclass-newclass.JPG"><img class="style8" style="width: 500px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/06-createjavaclass-newclass.JPG" alt="" /></a></p>
<p>Click Finish. I will put a method that adds two numbers.</p>
<span> </span>
<pre>public int add(int a, int b){
                return a + b;
}</pre>
<h2 style="color: red;">Renaming Java elements</h2>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">To rename a file, in Package manager, right click &#8216;Calculator.java&#8217;, select Refactor-&gt;Rename. Rename the file to &#8216;Math&#8217;. By default Eclipse will update all the references that points to Calculator to the new Math class name. Notice in the source code, &#8216;public class Calculator&#8217; is changed to &#8216;public class Math{&#8216;. Eclipses take care of changing the class name within the java file.</p>
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/07-renameclass.JPG"><img class="style9" style="width: 412px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/07-renameclass.JPG" alt="" /></a></p>

<h2 style="color: red;">Moving and copying Java elements</h2>
<p>Files can be moved between packages by simply dragging them. It can also be done by right clicking the file, selecting Refactor-&gt;Move. Lets create a new package called &#8216;ecl500.a24.lab1&#8242; and move Math.java file to that package. To create a new package, right click src folder, New-&gt;Package. Then drag the &#8216;Math.java&#8217; from &#8216;a24.labs.lab1&#8242; package to &#8216;ecl500.a24.lab1&#8242;. To create a copy of the java file. Right click on the file and select Copy. Then on destination location, say a24.labs.lab1, rightclick and select paste. Delete the old &#8216;a24.labs.lab1&#8242; package along with its content by rightclick and selecting Delete.</p>
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/08-newpackage.JPG"><img class="style4" style="width: 500px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/08-newpackage.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/09-programclass.JPG"><img class="style8" style="width: 500px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/09-programclass.JPG" alt="" /></a></p>

<h2 style="color: red;">Navigate to a Java element&#8217;s declaration</h2>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">Eclipse&#8217;s right click context menu has several functions that are very useful. One of the functions is &#8216;open declaration&#8217;. Open declaration opens the declaration of a type.</p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/10-opendeclaration.JPG"><img class="style10" style="width: 564px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/10-opendeclaration.JPG" alt="" /></a></p>
<p>To test this, lets use the Math class to perform some calculation. Create a new class called &#8216;Program.java&#8217; in ecl500.a24.lab1 package. Right click on the package name and select New-&gt;Class. Call this class &#8216;Program&#8217;. Make sure to check &#8216;public static void main..&#8217; option. Now right click on word Math and rightclick, Open declaration. Eclipse automatically opens the Math.java and highlights the class declaration. You can also accomplish this by selecting Navigate-&gt;Open Declaration</p>

<h2 style="color: red;">Viewing the type Hierarchy</h2>
<p>You can right click on any java file and rightclick select Open type hierarchy to see the type hierarchy of the class file. In the image, Our Math class is a subclass of Object class.You can also accomplish this by selecting Navigate-&gt;Open Type Hierarchy.</p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/11-typehierarchy.JPG"><img class="style6" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/11-typehierarchy.JPG" alt="" /></a></p>

<h2 style="color: red;">Searching the workbench</h2>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">Eclipse has a strong search feature. Open Search dialog by selecting Search-&gt;Search. There are 3 tabs for searching &#8216;Java Search&#8217;, &#8216;JavaScript Search&#8217; and &#8216;Plug-in Search&#8217;.</p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/12-search.JPG"><img class="style11" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/12-search.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/13-find.JPG"><img class="style12" style="width: 455px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/13-find.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">To do a granular seach you can use wildcards like * and ?. You can search fo &#8216;Type&#8217;, &#8216;Method&#8217;, &#8216;Package&#8217; etc. If you search for Math or M* or M???, you should be able to see Math resulted from all files. To search within a file, press Control+F in the text editor.</p>

<h2 style="color: red;">Running your programs</h2>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">There are several ways to get your java program run. The easiest way is to click on the Run icon on toolbar. This can also be accomplish by selecting Run-&gt;Run or rightclick on file and Run-&gt;Run. You can also use keyboard shortcut Control+F11 to run the program. The output is displayed on Console view.</p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/14-runIcon.JPG"><img class="style13" style="width: 389px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/14-runIcon.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/15-runConfiguration.JPG"><img class="style14" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/15-runConfiguration.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/15-runConfigurationIcon.JPG"><img class="style15" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/15-runConfigurationIcon.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">If your java application uses GUI, the output will be on a new window as a separate application. If you want configure how your java application runs, then you can create a run configuration.</p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">For example if your program need to take some arguments when run, or if your program must include some other library like JDBC connector package, you can create a run configuration that sets these up every time your program is run.</p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">Lets create a run configuration called &#8216;Program&#8217; by clicking New icon. Let me change the JRE to my alternate JRE. Click apply to save and Run to run the program. Now to run this program with same configuration, you can quickly select the Program name on run icon.</p>

<h2 style="color: red;">Debugging your programs</h2>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">To debug a program we put breakpoints in various lines of code and the program pauses the execution on that line of code. Then you can analyse values of variables or execute the rest of the program line by line. To debug in Eclipse, put a break point on a line in Math.java where the a+b is calculated. Now right click on the vertical grey bar on the left of editor and select toggle breakpoint. You can also do this by doubleclicking on the bar. Do the same process to remove a breakpoint.</p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/16-debug-breakpoint.JPG"><img class="style16" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/16-debug-breakpoint.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/16-debug-perspective.JPG"><img class="style17" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/16-debug-perspective.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/16-debug-perspective-toolbar.JPG"><img class="style18" style="width: 484px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/16-debug-perspective-toolbar.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">Now click on the debug iocn on toolbar. Eclipse gives you option to switch to Debug perspective. Click Yes. The program executes and pauses on the line where we put the breakpoint.</p>
<p>If you hover over any variable, you can see the value of the variable. From here, you can execute the rest of the program step by step. Click on &#8216;Step into&#8217; button several times. You will see the program moves forward line by line. To execute a full method without going into the method, you can press the &#8216;Step Over&#8217; button.</p>
<p>Click stop to stop debugging and click on &#8216;Java&#8217; button on perspective view on top right corner to return to normal view. Remove the breakpoint by double clicking on it.</p>

<h2 style="color: red;">Evaluating expressions</h2>
<p>Put a breakpoint on the last line of Program class and press debug. The program pauses on last last. It has not executed this line yet. Now select the method call myMath.add(100,200) then rightclick and select Display. The value of result return value of this method 300 is shown on display popup. Press control+Shift+D to move this value to Display view. Now in display view, we can see what method was executed and what result was returned with its type information as well.</p>
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/17-EvaluatingExpression.jpg"><img class="style19" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/17-EvaluatingExpression.jpg" alt="" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Evaluating expressions is useful during debugging a program. Stop the debugging and go to Java perspective view.</p>

<h2 style="color: red;">Evaluating snippets</h2>
<p>Scrapbook is a file where you can test small pieces of expressions in your program. It is useful for checking values of systems value. like value of PI. Create a new Scrapbook Page, name it MyScrapbook and click Finish. A new file MyScrapbook.jpage appears in your package explorer. Open MyScrapbook.jpage</p>
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/17-EvaluatingExpression-newscrapbook.jpg"><img class="style20" style="width: 527px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/17-EvaluatingExpression-newscrapbook.jpg" alt="" /></a></p>
<p>&nbsp;</p>
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/17-EvaluatingExpression-newscrapbook-02.jpg"><img class="style21" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/17-EvaluatingExpression-newscrapbook-02.jpg" alt="" /></a></p>
<p>Type Math.PI , select the Math.PI, rightclick and select Display. To check 100+200 in our method call really should be 300. Type 100+200 in scrapbook, select the line, rightclick and select Display. You will see the value 300 which confirms your add method is working fine.</p>
<p>You can write some snippets and quickly check the result without creating a class file.</p>

<h2 style="color: red;">Using the Java browsing perspective</h2>
<p>Java browsing perspective shows a drill down browsable view of your Project, Packages, Types, and Member methods. It displays the content of the method in the bottom editor. It is a built in perspective created by Eclipse. The look and feel is like a file browser. Some people may prefer to use this perspective for coding. The choice is yours.</p>
<p>&nbsp;</p>
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/17-z-JavaBrowsing.jpg"><img class="style22" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/17-z-JavaBrowsing.jpg" alt="" /></a></p>

<h2 style="color: red;">Writing and running JUnit tests</h2>
<p>With JUnit test, we can create programs using test driven software development approach. Test cases are conditions that testers create. The developer has to develop program that passes these test cases. When developer creates program which passes the test cases one by one, gradually the program is fully developed.</p>
<p>Lets create a subtract method to our program using JUnit test. Lets create a test for subtract method. We know (using a calculator) 300-100 = 200 for a subtract to be working good.</p>
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/18-JUnit-01.JPG"><img class="style23" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/18-JUnit-01.JPG" alt="" /></a></p>
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/18-JUnit-06.JPG"><img class="style24" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/18-JUnit-06.JPG" alt="" /></a></p>
<p>&nbsp;</p>
<p>In Math.java, create an empty method for subtract.</p>
<span> </span>
<pre>public int subtract(int a, int b){
  //no code yet. waiting for test cases. just return 0.
  return 0;
}</pre>
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/18-JUnit-07.JPG"><img class="style6" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/18-JUnit-07.JPG" alt="" /></a></p>
<p>Now lets create the Junit test. Select File-&gt;New-&gt;JUnit Test Case. Name this MathTest, click Next, select the subtract method, and click Finish. Click OK to add JUnit in build path.</p>
<p>Now select Run-&gt;Run as-&gt;JUnit Test. A new view is added to the perspective called JUnit. Since the subtract method is not implemented the test fails.</p>
<p>Lets create the test.</p>
<span> </span>
<pre>public class MathTest {
        @Test
        public void testSubtract() {
                Math math = new Math();
                assertEquals(100, math.subtract(300, 200));
        }
}</pre>
<p>Now in Math.java lets write a wrong code for subtraction to test the case. we will return a*b instead of a-b. This should fail the test we wrote. Run the test by clicking on the Rerun test button on JUnit view. As expected the test fails again.</p>
<p>Now correct the subtract method code to</p>
<span> </span>
<pre>return a-b;</pre>
<p>then rerun the test.</p>
<p>&nbsp;</p>
<p>Click OK if asked to save and launch.</p>
<p>&nbsp;</p>
<p><a href="http://thupten.feedback/wp-content/uploads/2011/02/images/18-JUnit-08.JPG"><img class="style6" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.feedback/wp-content/uploads/2011/02/images/18-JUnit-08.JPG" alt="" /></a></p>
<p>The test passes and the red bar changes to green. Failure is set to 0. In this way, we can use the JUnit test in Eclipse.</p>

<div><a href="http://thupten.feedback/wp-content/uploads/2011/02/ecl500a24-lab1-practicefiles.jar">Click here for the java files used to create this tutorial</a></div>

FYV8WTBXZEUG]]></content:encoded>
			<wfw:commentRss>https://www.thupten.feedback/2011/02/02/absolute-beginners-guide-to-eclipse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Singleton Pattern</title>
		<link>https://www.thupten.feedback/2010/06/20/singleton-pattern/</link>
		<comments>https://www.thupten.feedback/2010/06/20/singleton-pattern/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 22:21:49 +0000</pubDate>
		<dc:creator><![CDATA[thupten]]></dc:creator>
				<category><![CDATA[Opensource]]></category>
		<category><![CDATA[Others]]></category>
		<category><![CDATA[design pattern]]></category>
		<category><![CDATA[single object pattern]]></category>
		<category><![CDATA[singleton]]></category>
		<category><![CDATA[singleton pattern]]></category>

		<guid isPermaLink="false">http://thupten.veryusefulinfo.com/?p=83</guid>
		<description><![CDATA[In Singleton Pattern, the class can only create a single instance. We want a class to have only a single instance for various reasons. Sometimes, we want use a global object to keep information about your program. This object should not have any copies. This information might be things like configuration of the program, or [&#8230;]]]></description>
				<content:encoded><![CDATA[<a href="http://thupten.feedback/wp-content/uploads/2010/06/singleton.png"><img class="alignright size-full wp-image-86" title="singleton" src="http://thupten.feedback/wp-content/uploads/2010/06/singleton.png" alt="" width="200" height="240" /></a>In Singleton Pattern, the class can only create a single instance. We want a class to have only a single instance for various reasons.
Sometimes, we want use a global object to keep information about your program. This object should not have any copies. This information might be things like configuration of the program, or a master object that manages pools of resources. So when you need a resource, you ask the master object to get it for you. Now if there were many copies of this master object, you would not know whom to ask for that resource. This single object should not be allowed to have copies. Singleton Pattern forces this rule so that programmer doesn&#8217;t have to remember about not creating copies. Singleton pattern will create an instance if it doesn&#8217;t exist and will not create any new instance if an instance already exist. It will just return a reference to that single instance.
<pre name="code" class="java">
class ProgramConfiguration{
    public ProgramConfiguraiton(){
        //default constructor code
    }
}</pre>
<span id="more-83"></span>
A new instance of a class is created by the constructor. Most of the time, we have a public constructor, which is called to create a new instance. Since we want to prohibit multiple instance, we have to restrict access to the constructor. This is done by making the constructor private.
<pre name="code" class="java">
class ProgramConfiguration{
    private ProgramConfiguration(){
        //default private constructor code
    }
}</pre>
then we create a static public method that will make sure that only one instance lives in the whole program.
<pre name="code" class="java">
class ProgramConfiguration{
    private static ProgramConfiguration _configObject;
    private ProgramConfiguration(){
        //default private constructor code
    }
    public getInstance(){
        /*
        if an instance exist return that instance otherwise
        call the constructor to create an instance and return it.
        */
        if(_configObject == null){
            _configObject = ProgramConfiguration();
        }
    return _configObject;
    }
}</pre>
So anytime you want to get that single object, you call the getInstance() method.
<pre name="code" class="java">
public static void main(String[] args){
    /*
    no access to default constructor. so if you did
    ProgramConfiguration pc = new ProgramConfiguration();
    you will get compilation error.
    */
    ProgramConfiguration pc = ProgramConfiguration.getInstance();
    ProgramConfiguration newpc = ProgramConfiguration.getInstance();
    /*
    in the above code pc and newpc both point to the same static object. when
    getinstance() is called for the second time, it finds that _configObject is not null
    anymore, so it doesn't call the constructor to create any new instance.
    */
}</pre>]]></content:encoded>
			<wfw:commentRss>https://www.thupten.feedback/2010/06/20/singleton-pattern/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Factory method design pattern</title>
		<link>https://www.thupten.feedback/2010/06/09/factory-method-design-pattern/</link>
		<comments>https://www.thupten.feedback/2010/06/09/factory-method-design-pattern/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 08:45:01 +0000</pubDate>
		<dc:creator><![CDATA[thupten]]></dc:creator>
				<category><![CDATA[OpenOffice]]></category>
		<category><![CDATA[design pattern]]></category>
		<category><![CDATA[factory method design pattern]]></category>

		<guid isPermaLink="false">http://thupten.veryusefulinfo.com/?p=62</guid>
		<description><![CDATA[OpenOffice.org development heavily uses the Factory method design pattern. Design patterns are conventional templates that describes how to solve common software problems. Since most developers are familiar with the patterns, they can recognize a pattern in others source code. That makes working in teams easier. There are many popular design patterns. One of them is [&#8230;]]]></description>
				<content:encoded><![CDATA[<a href="http://thupten.feedback/wp-content/uploads/2010/06/Factory_1.png"><img class="size-full wp-image-74 alignright" title="Factory_1" src="http://thupten.feedback/wp-content/uploads/2010/06/Factory_1.png" alt="" width="200" height="165" /></a>OpenOffice.org development heavily uses the Factory method design pattern.

Design patterns are conventional templates that describes how to solve common software problems. Since most developers are familiar with the patterns, they can recognize a pattern in others source code. That makes working in teams easier. There are many popular design patterns. One of them is Factory method pattern.

Factory method pattern is a type of creational pattern. Creational pattern pattern solves problems related to creating. Factory pattern solves two major problem generally faced by developers.
<span id="more-62"></span>
To reduce too many new operator usage
<ol>
	<li>When working on a large software, numerous instances of classes are created continuously at the runtime. The programmer cannot predict what the user is going to do. So at any given time, the programmer doesn&#8217;t know what object is create. For example, To create a new document, the user might click new text document or new spreadsheet document. There would several possibilities about what the user is going to do. So, a factory class is assigned to do all  these repetitive work of creating a new instance of what the user wants. By separating these repetitive object creations into a factory class, when new classes are added, only the factory class need to be updated.</li>
	<li>To create object without knowing its class name.
When using the concrete classes, the developer has to remember the class names. In factory pattern, choosing what type of object to be created is delegated to the factory class. Usually this is done by sending a parameter. Based on the parameter passed to the factory, the factory creates an instance of a certain type/class.</li>
</ol>
<a href="http://thupten.feedback/wp-content/uploads/2010/06/factorypattern.gif"><img class="alignnone size-medium wp-image-65" title="factorypattern" src="http://thupten.feedback/wp-content/uploads/2010/06/factorypattern-300x151.gif" alt="" width="300" height="151" /></a>

Here is the pseudo code.
<pre name="code" class="java">
public final class DocumentFactory {
   XDocument document;
   XDocument getDocument(String type){
      if(type.equals("text"){
         document = new TextDocument();
      }
      else if(type.equals("sheet"){
         document = new SpreadSheet();
      }
   return document;
   }
}</pre>
<pre name="code" class="java">
public interface XDocument{
   open();
}</pre>
<pre name="code" class="java">
public class TextDocument implements XDocument{
   //concrete class for Text documents
   open(){
      //method to open text document
      System.out.println("opening a text document...");
   }
}</pre>
<pre name="code" class="java">
public class SpreadSheet implements XDocument{
   //concrete class for spreadsheet documents
   open(){
      //method to open spreadsheet document
      System.out.println("opening a spreadsheet document...");
   }
}</pre>
<pre name="code" class="java">
class DocumentProgram{
   public static void main(String[] args){
   //this just created an instance of TextDocument without knowing its class name.
   XDocument doc = df.getDocument("text");
   doc.open();
   }
}</pre>]]></content:encoded>
			<wfw:commentRss>https://www.thupten.feedback/2010/06/09/factory-method-design-pattern/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
