Вы находитесь на странице: 1из 9

Exercise 1 - App Inventor exercise based on the PaintPot tutorial exercise

1. Basic Information

1.1 How well did you complete the I did it but I feel I should have done
exercise? better

1.2 Briefly explain your answer to I did not complete enhancement


question. question(Switching images)

2. Exercise answer
EDITOR SCREENSHOT

DEMONTRATION SCREENSHOT
Exercise 2 - App Inventor exercise based on the MoleMash tutorial example

1. Basic Information

Question Answer

1.1 How well did you complete the I did everything that was asked
exercise?

1.2 Briefly explain your answer to I followed the instruction and make it
question completed.

2. Exercise answer

 Screen shots demonstrating:


 Screen shot from the Blocks Editor :
Exercise 3 - Investigation of "Android API level"

1. Basic Information

1.1 How well did you complete the I did it but I feel I should have done
exercise? better

1.2 Briefly explain your answer? I have tried, but feeling that is not
enough.

2. Exercise answer

- Android platform version (APV) is a version of android operating system.


For instance, it likes window 7, window Xp and so on of Window OS.
- Android Api Level (API) is corresponding library support for APV. It allows
programmer show the new features in applications.

The Android platform provides a framework API that applications can use to
interact with the underlying Android system. Therefore, API is compatible with
each certain APV.
[1]
The framework API consists of:

 A core set of packages and classes


 A set of XML elements and attributes for declaring a manifest file
 A set of XML elements and attributes for declaring and accessing resources
 A set of Intents
 A set of permissions that applications can request, as well as permission
enforcements included in the system

When API updated a new version, a new feature will be introduced. But,
applications still using it because old version of API level is not deleted.
Platform version API level

Android 3.0 11
Android 2.3.3 10

Android 2.3 9
Android 2.2 8
Android 2.1 7
Android 2.0.1 6

Android 2.0 5
Android 1.6 4
Android 1.5 3
Android 1.1 2
Android 1.0 1

Illustration image of API level and Platform version


Exercise 4 - Add a button and Activity to the NameEntry App

1. Basic Information

1.1 How well did you complete the  I did everything that was asked
exercise?

1.2 Briefly explain your answer. I add a new click event button. When
click at it, open new activity that
changes the name of button.

2. Exercise answer

CODE SCREENSHOT DEMONSTRATION

public void eventclick (View v)


{
final Button btn = (Button)
findViewById(R.id.click1) ;
if(x==0){
x=1;
btn.setText("Why did
you do that");
return;
}

if(x==1){
x=0;
btn.setText("Don’t
press me");
return;
}

}
Exercise 5 - Create an Android App to calculate overtime pay.

1. Basic Information

QUESTION ANSWER

1.1 How well did you complete the  I did everything that was asked
exercise? Tick as appropriate.

1.2 Briefly explain your answer to I did as given context. To calculate


question. the payment for extra time hours
working, we interested in 3 fields:
-standard weekly hour.
-hour rate and total work.

2. Exercise answer
CODE SCREENSHOT
public class OnClick implements
OnClickListener
{

@Override
public void onClick(View
v) {

int n1 =
Integer.parseInt(e1.getText().toStrin
g());

float n2 =
Float.parseFloat(e2.getText().toStrin
g());
float
calculation;

if(n2<=35)
{
calculation
= n1*n2;

t.setText(Float.toString(calcu
lation));

}
else if(n2>35)
{
calculation
= (float) (35+((n2-35)*1.5))*n1 ;

t.setText(Float.toString(calcu
lation));

}
return;

}
Exercise 6 - SQLite database exercise

1. Basic Information

1.1 How well did you complete the I did everything that was asked
exercise? Tick as appropriate.

1.2 Briefly explain your answer to I followed the instruction and make it
question completed.

2. Exercise answer

CODE SCREENSHOT

rowValues.put("name", name);
rowValues.put("dob",
dob);
rowValues.put("email",
email);
rowValues.put("address",
address);

[1] : <uses-sdk> | Android Developers. 2015. <uses-sdk> | Android Developers. [ONLINE] Available at:
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels. [Accessed 10
April 2015].

Вам также может понравиться