Course+Materials

=Slides= Slides are similar, but not identical, to last year's slides.
 * [[file:esp1314/Introduction to the Course.pdf|Introduction to the course]]
 * [[file:esp1314/Information About the Course.pdf|Information about the course]]
 * [[file:esp1314/Language Basics.pdf|Language basics]]
 * OO basics
 * Introduction to the platforms
 * Application basics
 * [[file:esp1314/Application Basics for Android.pdf|Application basics for Android]]
 * Application basics for Android: the [[file:esp1314/Application Basics for Android - NDK.pdf|NDK]]
 * [[file:esp1314/Application Basics for iOS.pdf|Application basics for iOS]]
 * [[file:esp1314/Memory Management in Cocoa.pdf|iOS (and OSX) memory management]]
 * [[file:esp1314/Application Basics for Windows Phone.pdf|Application basics for Windows Phone]]
 * [[file:esp1314/Design Patterns.pdf|Design patterns]]
 * [[file:esp1314/UI Specification - Approaches.pdf|Approaches to UI specification]]
 * App tips: switching UIs, [[file:esp1314/App Tip - Saving State.pdf|saving state]], [[file:esp1314/App Tip - Managing Orientation.pdf|managing orientation]]
 * [[file:esp1314/Data Storage - SQLite.pdf|Data storage: SQLite]]
 * [[file:esp1314/Accessing Hardware.pdf|Accessing hardware]]: [[file:esp1314/Accessing Hardware - Android.pdf|Android]], [[file:esp1314/Accessing Hardware - iOS.pdf|iOS]]
 * [[file:esp1314/Multitasking.pdf|Multitasking]] in Android, iOS and Windows Phone
 * [[file:esp1314/More about Languages.pdf|More about languages]]
 * [[file:esp1314/UI Guidelines.pdf|Guidelines for user interface design]]
 * [[file:esp1314/UIs for Tablets.pdf|User interfaces for tablets]]
 * [[file:esp1314/UI - Gestures.pdf|User interface: gestures]] (not part of the syllabus)

=Projects= The description of the default project is [|available as a shared Google Document]. Special projects are described here. As far as the grading of projects is concerned, be aware that ** quality will be rewarded more than quantity **. For instance, an application that provides only basic functionalities but is "rock solid" will get higher grades than an application that offers a lot of optional functions but does not respect the UI guidelines for the chosen platform, does not properly handle error conditions, stops recording data when it is moved to the background, and so forth. ** The quality of the source code will be also considered in the grading process **. For instance, source code that is properly commented and highly modular will be favored over code that lacks comments, uses cut-and-paste instead of inheritance, and so forth.

=Suggested Exercises=
 * __Language basics__: build a program that generates two matrices, prints them, sums them, then prints the result. Fill the input matrices with random doubles. **Do the exercise in all three languages** (Java, C++ and Objective-C). If you do not know how to generate random numbers, look at the sample code in [[file:esp1112/CompilerTests.zip|CompilerTests.zip]].
 * __OO basics__: design a class called Polygon that handles polygons with an arbitrary number of sides. The class should store the coordinates of all the vertices of the polygon: the vertices are assumed to be on a plane, therefore two coordinates are sufficient. The vertices are numbered and edges go from vertex //i// to vertex //i//+1. The class should provide methods to 1) get and set the number of vertices in the polygon; 2) get and set the coordinates of the vertices; 3) get the perimeter of the polygon. The class should also provide a non-default constructor that receives the number of vertices when an object is instantiated from the class. In the default constructor you can assume that the polygon has an unmodifiable number of sides of your choice or, if you want to tackle a challenging exercise, you can use a data structure that allows you to adjust the number of sides dynamically (an ArrayList in Java, a vector in C++, an NSMutableArray in Objective-C). When Polygon is complete, design a new class Triangle derived from Polygon . The new class should provide an additional method to get the area of the triangle. **Do the exercise in all three languages** (Java, C++ and Objective-C).
 * __Application basics__: build a simple calculator application that operates on integer numbers. The UI of the calculator should provide at least 16 buttons: 10 buttons for the digits from "0" to "9", 4 buttons for the 4 basic operations ("+", "-", "×", "÷"), an "=" button to calculate the result, and a "C" button that resets the calculator. The UI should also provide a display that shows the numbers being input and the results. **Implement the calculator on more than one platform**. **Write your own code** even if pre-built solutions can be found online.

=Guides=

Android

 * [[file:esp1213/ListUIAndroid.pdf|Slides]] (Revision 2, June 4th 2013)
 * [[file:esp1213/ListViewExample1.tgz|ListView basic example]] (Android project)
 * [[file:esp1213/customlistview.tgz|Custom item view example]] (Android project)
 * [[file:esp1213/FragmentListExample.tgz|ListFragment example]] (Android project)

iOS

 * [[file:esp1213/iOSTableView.pdf|Slides]] (Revision 2, June 18th 2013)
 * [[file:esp1213/iOSTableViewBasic.tgz|Table View basic example]] (XCode project)
 * [[file:esp1213/iOSTableViewWithImage.tgz|Table View with image]] (XCode project)
 * [[file:esp1213/TableViewStoryboard.tgz|Table View using storyboards]] (XCode project)

Debugging with Eclipse

 * [[file:Debugging with Eclipse.pdf|Tutorial on Java debugging with the Eclipse IDE]] (25 March 2014)