Thursday, 13 March 2014

Type Of App I Wish To Create

Type Of App I Wish To Create 


I will design a mobile app which could help me to find out information on health and fitness, medications side effects and reminders of doctor appointments.


The features must be easily accessible to elderly people.  One of the features is to have a pen input design patterns for the elders to write down their appointments and send notifications as reminders of their appointments via SMS or alarm clocks.  For elders who stay in cold places, they can use the stylus to access their input. Pen interfaces can be an excellent alternative to provide additional precision and obscure less of the screen.

Sunday, 9 March 2014

Declaring and Initialising Variables

Declaring and Initialising Variables


In Python, we can declare and initialize variables using the following formats:

x = 5
y = 1.75
z = “john”
Python is smart enough to know that the data type for age is int, height is float and name is str.

In Java, you declare and initialise variables in the following formats:

int age = 8;
double height = 1.79;
String name = “sam”;
You have to state the data type of the variable as part of variable declaration. (Take note of the semi-colon at the end of each statement).

 One Important point to note:
For python, you can change the data type of a variable. For example,the same variable a can be used to store the value 1 (an integer) and the value “john” (a String).

This is not allowed in Java. If you have declared the variable a as an integer.

int a = 1;
You will get an error if you attempt to do the following:


a = “john”;

Saturday, 8 March 2014

Variable and Data Type

Data Type (Python VS Java)

 Data type used in Python:


int – Used for whole numbers (e.g. 1, 10, 100)
float – Used for decimal numbers (e.g 1.4, 2.5, 3.0)
str – Used for any textual data (e.g. ‘John, “Peter”, “Male”)
You can use both single quote (‘john’) or double quote (“john”)


Data type used in Java:

int – Used for whole numbers as well
float, double – Used for decimal numbers
In this course, for simplicity, we will always use double to store decimal numbers.

String – Used for text data. Take note that only double quotation is allowed (“john”)
char- Is also know as single character. Take note that only single quotation is allowed ('a')