
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.hh.se/ceres/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.hh.se/ceres/index.php?action=history&amp;feed=atom&amp;title=PA_8001_2013_Practical_4</id>
		<title>PA 8001 2013 Practical 4 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.hh.se/ceres/index.php?action=history&amp;feed=atom&amp;title=PA_8001_2013_Practical_4"/>
		<link rel="alternate" type="text/html" href="https://wiki.hh.se/ceres/index.php?title=PA_8001_2013_Practical_4&amp;action=history"/>
		<updated>2026-05-10T01:02:43Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.22.6</generator>

	<entry>
		<id>https://wiki.hh.se/ceres/index.php?title=PA_8001_2013_Practical_4&amp;diff=3036&amp;oldid=prev</id>
		<title>Slawek: Created page with &quot;== Objectives ==  There are two main objectives for this practical:   * Learn about and use the basic concepts of Android programming  * Understand the concurrency constructs ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.hh.se/ceres/index.php?title=PA_8001_2013_Practical_4&amp;diff=3036&amp;oldid=prev"/>
				<updated>2014-06-23T09:22:42Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Objectives ==  There are two main objectives for this practical:   * Learn about and use the basic concepts of Android programming  * Understand the concurrency constructs ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Objectives ==&lt;br /&gt;
&lt;br /&gt;
There are two main objectives for this practical: &lt;br /&gt;
&lt;br /&gt;
* Learn about and use the basic concepts of Android programming&lt;br /&gt;
&lt;br /&gt;
* Understand the concurrency constructs in Android&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Instructions ==&lt;br /&gt;
&lt;br /&gt;
Submit a single .zip file on blackboard with two folders, each containing the solutions to the below-specified parts. &lt;br /&gt;
For each application, specify beforehand at least four different test-cases and include them as a comment in your main class. &lt;br /&gt;
Also for each non-trivial function specify pre- and post-condition and some test-cases. &lt;br /&gt;
Implementing the test-cases using JUnit will be considered a bonus. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Part 1: ADT Basics: Prime numbers ===&lt;br /&gt;
&lt;br /&gt;
Install Android SDK (or ADT bundle) from [http://developer.android.com/sdk]. &lt;br /&gt;
&lt;br /&gt;
Make a new Android project similar to the one created during the lecture and further elaborated at [http://developer.android.com/training/basics/firstapp/index.html].&lt;br /&gt;
&lt;br /&gt;
Implement the Quitter application described in the lecture. &lt;br /&gt;
It has a single button and quits the application once the button is pressed. &lt;br /&gt;
Additionally, it creates logs on the development window for each and every step in the activity lifecycle. &lt;br /&gt;
&lt;br /&gt;
=== Part 2: Concurrency ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modify it in such a way that  in the main activity the use can enter an integer and &lt;br /&gt;
in the second activity the set of prime numbers up to that integer are displayed (one by one in a text-box, with 1 second delay). &lt;br /&gt;
If the entered text is not an integer, then an error message should be logged on the developer terminal, &lt;br /&gt;
a toast notification is displayed and &lt;br /&gt;
the second activity should not be started.  &lt;br /&gt;
&lt;br /&gt;
At any moment the user should be able to stop the calculation and return to the main activity. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Observe the behavior when a large natural number is entered. &lt;br /&gt;
This is caused by the single-thread model in the application.&lt;br /&gt;
Separate the threads for calculating next numbers and make UI reactive. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[PA 8001 Ed 2013|Back to Embedded Systems Programming]] ==&lt;/div&gt;</summary>
		<author><name>Slawek</name></author>	</entry>

	</feed>