<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="et">
	<id>http://courses.cs.taltech.ee/w/index.php?action=history&amp;feed=atom&amp;title=ITI0011%3AKimp_homework</id>
	<title>ITI0011:Kimp homework - Redigeerimiste ajalugu</title>
	<link rel="self" type="application/atom+xml" href="http://courses.cs.taltech.ee/w/index.php?action=history&amp;feed=atom&amp;title=ITI0011%3AKimp_homework"/>
	<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=ITI0011:Kimp_homework&amp;action=history"/>
	<updated>2026-05-21T19:04:29Z</updated>
	<subtitle>Selle lehekülje redigeerimiste ajalugu</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>http://courses.cs.taltech.ee/w/index.php?title=ITI0011:Kimp_homework&amp;diff=854&amp;oldid=prev</id>
		<title>Ago: Uus lehekülg: &#039;Back to course web page  This is English version of second homework. Estonian version is here: ITI0011:Kimp.  == General ==  Deadline:  * HW3 folder pushed to git...&#039;</title>
		<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=ITI0011:Kimp_homework&amp;diff=854&amp;oldid=prev"/>
		<updated>2014-10-20T23:33:53Z</updated>

		<summary type="html">&lt;p&gt;Uus lehekülg: &amp;#039;Back to &lt;a href=&quot;/pages/ITI0011&quot; class=&quot;mw-redirect&quot; title=&quot;ITI0011&quot;&gt;course web page&lt;/a&gt;  This is English version of second homework. Estonian version is here: &lt;a href=&quot;/pages/ITI0011:Kimp&quot; title=&quot;ITI0011:Kimp&quot;&gt;ITI0011:Kimp&lt;/a&gt;.  == General ==  Deadline:  * HW3 folder pushed to git...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Uus lehekülg&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Back to [[ITI0011|course web page]]&lt;br /&gt;
&lt;br /&gt;
This is English version of second homework. Estonian version is here: [[ITI0011:Kimp]].&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
Deadline: &lt;br /&gt;
* HW3 folder pushed to git before &amp;#039;&amp;#039;&amp;#039;16. November 23:59&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;18. or 20. November (depending on your practice time)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Defending your homework one week before (or earlier) will give you +1 point. The code must be in git before defending.&lt;br /&gt;
&lt;br /&gt;
The goal of the homework is to develop a JavaFX program which enables to draw and manipulate shapes.&lt;br /&gt;
&lt;br /&gt;
== Main (4p) ==&lt;br /&gt;
&lt;br /&gt;
* The program presents a GUI (a window) and enables drawing free hand line inside the window using the mouse.&lt;br /&gt;
* The line starts with mouse press.&lt;br /&gt;
* While the mouse is dragged (mouse is down and mouse is moving), the the trajectory should be shown as drawing a line.&lt;br /&gt;
* The line is finished if the mouse is released.&lt;br /&gt;
* There can be unlimited number of different lines.&lt;br /&gt;
* Point can also be drawn (if the user just clicks the mouse - the starting point and the ending point of the line are the same)&lt;br /&gt;
* Pressing &amp;#039;&amp;#039;&amp;#039;&amp;lt;escape&amp;gt;&amp;#039;&amp;#039;&amp;#039; exits the program.&lt;br /&gt;
&lt;br /&gt;
== Additional part: rectangle (1p) ==&lt;br /&gt;
&lt;br /&gt;
* In addition to free hand line, the program allows to draw a rectangle using the mouse.&lt;br /&gt;
* If the mouse is pressed, one corner of the rectangle is fixed in that location.&lt;br /&gt;
* While dragging, the opposite corner of the rectangle is moved.&lt;br /&gt;
* During the dragging, the rectangle should be visible (one corner is fixed, another moves along with the mouse).&lt;br /&gt;
* How exactly the user can select which shape to draw (free hand line or rectangle) is up to the student (you can use buttons, keyboard somehow etc).&lt;br /&gt;
&lt;br /&gt;
== Additional part: moving and deleting shapes (2-3p) ==&lt;br /&gt;
&lt;br /&gt;
A shape can be moved:&lt;br /&gt;
* When the user holds &amp;#039;&amp;#039;&amp;#039;&amp;lt;control&amp;gt;&amp;#039;&amp;#039;&amp;#039; key, shapes can be moved:&lt;br /&gt;
** while moving (just holding ctrl, no mouse button is clicked) around, the closest shape will be highlighted by adding shadow effect to it&lt;br /&gt;
** when left mouse button is pressed, the moving starts&lt;br /&gt;
** while the left mouse button is down and the mouse is dragged, the shape moves along with the mouse cursor&lt;br /&gt;
** the shape should be visible during the move (and it follows the cursor movement)&lt;br /&gt;
** if the mouse button is released, the shape is moved&lt;br /&gt;
** if ctrl is still down, the user can go on with moving the next shape.&lt;br /&gt;
&lt;br /&gt;
A shape can be deleted:&lt;br /&gt;
* When the user holds &amp;#039;&amp;#039;&amp;#039;&amp;lt;control&amp;gt;&amp;#039;&amp;#039;&amp;#039; key, shapes can be deleted:&lt;br /&gt;
** as with moving the shape, moving around the mouse will highlight the closest shape to the cursor&lt;br /&gt;
** when right mouse button is clicked, the shape is deleted.&lt;br /&gt;
&lt;br /&gt;
This additional part gives 2 points if drawing rectangle additional part is not implemented.&lt;br /&gt;
&lt;br /&gt;
This additional part gives 3 points if both drawing the rectangle and free hand line are implemented.&lt;br /&gt;
&lt;br /&gt;
== Additional part: undo/redo (2p) ==&lt;br /&gt;
&lt;br /&gt;
* The program stores all the actions done by the user.&lt;br /&gt;
* All the actions can be taken back (undo):&lt;br /&gt;
** drawing a shape&lt;br /&gt;
** moving a shape&lt;br /&gt;
** removing a shape&lt;br /&gt;
* Undo works with &amp;#039;&amp;#039;&amp;#039;&amp;lt;escape&amp;gt;&amp;#039;&amp;#039;&amp;#039; key.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;escape&amp;gt;&amp;#039;&amp;#039;&amp;#039; takes back one action.&lt;br /&gt;
* If there is no more actions to take back, exiting program with esc key will continue.&lt;br /&gt;
* In addition to undo, actions can be repeated (redo).&lt;br /&gt;
* Program can redo only actions which have been undone.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;space&amp;gt;&amp;#039;&amp;#039;&amp;#039; key is used for redo.&lt;br /&gt;
&lt;br /&gt;
To get 2 points, moving and removing the shape should be implemented.&lt;br /&gt;
&lt;br /&gt;
If only drawing is implemented (the main part), then redo and undo together will give only 1 point.&lt;br /&gt;
&lt;br /&gt;
== Additional part: GUI improvements (2p) ==&lt;br /&gt;
&lt;br /&gt;
This part requires other additional parts to be implemented.&lt;br /&gt;
&lt;br /&gt;
The task is to improve the GUI:&lt;br /&gt;
* When pressing &amp;#039;&amp;#039;&amp;#039;&amp;lt;escape&amp;gt;&amp;#039;&amp;#039;&amp;#039; (to exit the program after all is undone), a confirmation dialog should be presented to the user (e.g. &amp;quot;Are you sure you want to exit?&amp;quot;) with options like &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot; or &amp;quot;cancel&amp;quot;.&lt;br /&gt;
* The user can pick the color for the next shape he/she draws. It&amp;#039;s not required to change the color for existing shape (although you can still try to implement this). The program should contain ColorPicker element.&lt;br /&gt;
* Undo and redo have buttons (or are in menu). In addition to &amp;lt;escape&amp;gt; and &amp;lt;space&amp;gt;, buttons can be used.&lt;br /&gt;
* Shape selection (free hand line or rectangle) is done with buttons or other GUI element.&lt;/div&gt;</summary>
		<author><name>Ago</name></author>
	</entry>
</feed>