Thursday, January 31, 2008

ICA-CP: Question of the Week 1/28/08-2/1/08

[This weeks Question of the Week response should be at least 200 words. I is due by 5:00 PM on Friday, 2/1/08.)

Here's the questions: What is your vision for technology influencing your life in the next 10-15 years?

Background: Read a couple of articles. On is The Next 25 Years in Tech at http://www.pcworld.com/article/id,141791/article.html. The other article is Smart Badges Track Human Behavior at http://www.technologyreview.com/Infotech/20129/. One consideration is whether our privacy will disappear as technology becomes more and more a part of our daily lives. What if, for example, your cell phone could tell your location (GPS), how fast you're walking/running (or not), whether you are standing up or horizontal (available now in cell phones for police and fire personnel), your heart rate, and respiration as well as keep track of all the items you buy online -- and post all this info on something like facebook (remember at Christmas, facebook posted what people were buying online, which spoiled Christmas surprises)?

Wednesday, January 30, 2008

ICA-CP Summary: Cell phone teams

Motorola Razr Hardware Teams

Asset# - Team
01233 – Roneisha & Justina
01234 – Jamie & Lizette
01235 – Lee & Devinah
01236 – Theresa & Nadia
01237 - La'Shanae & Rafi
01238 - Na-Li & Maria
01239 - Courtney & Beverly
01240 - Natalye & Katherine
01241 - Veronica & Sandra
01242 - Ricka & Michaela
01243 - Christina & Ashley

ICA-CP: 1/31/2008

Good afternoon!

Today is our Nov., Dec., and Jan. birthday party. But we also have ongoing work to complete. This is our current list:

1) Unlock your team's Razr for Java. See blog entry from last class for instructions.
2) Create your own MyHelloWorld midlet to run in the Motorola simulator and on the Razr. Read the ICA-INFO: Creating MyHelloWorld from MyFirstMidlet blog entry for instructions. This program is due on 2/4/2008 by the end of class. It is worth 40 points. Turn in a printout of the Motorola Razr screen showing your program output.
3) Download your program to the Razr hardware and run your MyHelloWorld program.
This program is due on 2/8/2008 by the end of class. It is worth 20 points. Mrs. Clingingsmith needs to check-off project completion.

We will have a quiz on Weds. next week also. So, here's our calendar:

Monday, 2/4/08 - MyHelloWorld printout from Motorola simulator due.
Wednesday, 2/6/08 - Quiz on DOS, file systems, steps to create a midlet, and midlet library commands.
Friday, 2/8/08 - MyHelloWorld running on the Razr is due.

Tuesday, January 29, 2008

ICA-CP: 1/29/2008 - Unlocking a Razr V3

Good afternoon!

We are going to do something a bit different today. In your hardware teams, you will be attempting to unlock the Motorola Razr V3 cell phones so that Java programs may be loaded onto them. Usually, one has to send a cell phone to Motorola, pay a fee, and wait to weeks for the phone to return.

So, all the info you need to unlock your cell phone is on your CDs. It is in the folder called C:\Unlock Motorola Cell Phone Programs\. In the main folder, there is a tutorial. All the software you need is in the C:\Unlock Motorola Cell Phone Programs\SW folder.

There are 4 pieces of software in the C:\Unlock Motorola Cell Phone Programs\SW folder. They are:
1) The USB driver so the computer can talk to the cell phone in P2K Drivers for Windows XP.
2) The product support tools in C:\Unlock Motorola Cell Phone Programs\SW\Phone Support Tools\PST_7.1.1
3) The Midway Tool in C:\Unlock Motorola Cell Phone Programs\SW\Motorola MIDway 2.8
4) The Motorola Mobile Phone Tools in C:\Unlock Motorola Cell Phone Programs\SW\Motorola Mobile Phone Tools

In order to install and runthem, follow the instructions in this file: C:\Unlock Motorola Cell Phone Programs\1-tut.pdf. If you are successful, your cell phone will be unlocked.

Wednesday, January 23, 2008

ICA-INFO: Creating MyHelloWorld from MyFirstMidlet

Using the CASE method, create a HelloWorld program that may be run on a cell phone. The HelloWorld program should display, "Hello World from [your name]!!" The stages are:

I Make sure the J2ME library files are installed in BlueJ.
II Code and compile your file.
III Preverify your compiled file.
IV Create a manifest.mf file.
V Create a .jar file.
VI Create a .jsd file
VII Run the midlet.

Step 1) Before compiling your Java program, copy these two Jave 2 Micro-Edition library files files:

clcdapi10.jar
midpapi20.jar

from the R drive in the J2ME Libraries file to the C:\BlueJ\lib\userlib\ subdirectory. In BlueJ, add these two files to your library. Click Tools --> Preferences. Choose the Libraries tab. Click the Add button. Navigate to the C:\BlueJ\lib\userlib\ folder, and add each of the two jar files above.

Step 2) Create a new project inBlueJ called MyHelloWorldMidlet.

Step 3) In BlueJ or JCreator, create a new class called MyHelloWorld.

Step 4) Open the MyFirstMidlet.java program in BlueJ Copy all of the source code from MyFirstMidlet.java into your new MyHelloWorld class in BlueJ.

Step 5) In BlueJ, change every occurrence of MyFirstMidlet to MyHelloWorld.

Step 6) In BlueJ, add your name to this line:
StringItem item = new StringItem("Hello World!", "This is a Java ME MIDlet");
Make it say "Hello World from [your name]!!" plus "This is [your name]'s MIDlet"
Example: Hello World from Debbie and This is Debbie's midlet.

Step 7) Compile the program.

Step 8) Now, preverify your compiled MyHelloWorld.class program file. Run cmd. Then cd to
to your BlueJ project subdirectory. Execute the preverify command:

\Motorola RazrV3 SDK\JMESDK\bin\preverify -classpath "\Motorola RazrV3 SDK\JMESDK\stubs\jsr139.jar";"\Motorola RazrV3 SDK\JMESDK\stubs\jsr118.jar";. -d . MyHelloWorld

If your program passes the preverify, then go onto Step 8.

Step 9) Make a manifest.mf file by opening Notepad and copying the following lines into it:

MIDlet-Name: Hello World Example
MIDlet-Version: 1.0
MIDlet-Vendor: Motorola
MIDlet-1: MyFirstMidlet, , MyFirstMidlet
MicroEdition-Profile: MIDP-2.0
MicroEdition-Configuration: CLDC-1.0

Change the MIDlet-Vendor: Motorola line. Replace the word Motorola with a business name of your choice, for example, Debbie's Java Programming Company.

Change the MIDlet-1: MyFirstMidlet, , MyFirstMidlet line. Replace every occurrence of MyFirstMidlet to MyHelloWorld.

Save the file.

Step 10) Make a jar file. In BlueJ, go to Project --> Create JAR File. The .jar file will include your MyHelloWorld.class and manifest.mf file. You should now have a MyHelloWorld.jar file.

Step 11) Make a MyHelloWorld.jad file by opening Notepad and copying the following lines into it:

MIDlet-Name: Hello World Example
MIDlet-Version: 1.0
MIDlet-Vendor: Motorola
MIDlet-Jar-URL: MyHelloWorld.jar
MIDlet-Jar-Size: 1128
MIDlet-1: MyHelloWorld, , MyHelloWorld
MicroEdition-Profile: MIDP-2.0
MicroEdition-Configuration: CLDC-1.0

Change the MIDlet-Vendor: Motorola line. Replace the word Motorola with a business name of your choice, for example, Debbie's Java Programming Company.

Change the MIDlet-1: MyFirstMidlet, , MyFirstMidlet line. Replace every occurrence of MyFirstMidlet to MyHelloWorld.

Change the MIDlet-Jar-Size: 1128 line to reflect the size of your MyHelloWorld.class file. Find the size by looking up the file properties in My Computer. Find the file in My Computer, and right click on the file icon. The file size will be displayed in bytes. Substitute the number of bytes for your MyHelloWorld.class file for the 1128.

Save the file.

Step 12) Run the program in the Motorola SDK emulator.

Class Info: How to create a midlet

A midlet is a java program that runs on a cell phone. First, a little background on Java -- there are different versions of Java. There is a Java version called J2EE which is an acronym for Java 2 Enterprise Edition. There's a version that runs a a computer that allows already compiled programs to run called the JRE or Java Runtime Environment. There's one called EmbeddedJava. A scaled down version of the J2EE called the J2ME, which stands for Java 2 Platform, micro edition runs on cell phones. The J2ME is what we use to create midlets. For a Wikipedia definition of a midlet see: http://en.wikipedia.org/wiki/MIDlet.

There are 7 steps to create a midlet. The steps are: (1) Design, (2) Code, (3) Compile, (4) Deploy, (5) Test, (6) Package, and (7) Preverify. You are already familiar with the first three steps: Design, Code, and Compile. For a cell phone, we have to think about the size of the screen and the other cell phone limitations and capabilities in the Design step. In the Code step, we can use BlueJ as we have done for our other projects. However, when we code for a cell phone, we need to include some special libraries with an import command. When we compile a Java program for a cell phone, we have to specify something called the CLASSPATH. The classpath is the subdirectory on a cell phone where the program will look for the libraries it will use. For more info on a classpath, see this Wikipedia article: http://en.wikipedia.org/wiki/Classpath_(Java)
We will go over each step in detail. If you would like a head start, there is a tutorial at http://today.java.net/pub/a/today/2005/02/09/j2me1.html?page=2

But, for our first HelloWorld cell phone program, we will be using the CASE method and will modify the MyFirstMidlet midlet.

ICA-CP: 1/23/2008 - Running the Motorola SDK

Good morning!

Today, we will become more familiar with the Motorola Software Developer's Kit. A Software Developer's Kit is abbreviated SDK. Following that idea, Motorola named the cell phone emulator program sdk.exe.

Activity #1
The first activity to do today is to create a shortcut to the SDK.exe program. Go to this subdirectory: C:\Motorola RazrV3 SDK\ You should see the SDK.exe program in this folder. Right click on the sdk.exe file and select Pin to Start Menu from the menu choices. Now, you should see SDK listed as a choice under Start. Additionally, create an icon on your desktop. Right click on the sdk.exe file again. This time select Send To then select Desktop from the menu list. You should now see an SDK icon on your desktop.

Activity #2]
Now, familiarize yourself with the file system in the C:\Motorola RazrV3 SDK\ directory. You should see a JMESDK subdirectory. Go into it. You should see a list of 13 subdirectories under JMESDK. Go into the demos subdirectory. You should see subdirectories with different programs in them. There should be 12 different subdirectories with programs in them. This is where you find programs to run in the Motorola SDK program. List at least 4 programs on your worksheet. Notice also that the fully qualified path name to this subdirectory is: C:\Motorola RazrV3 SDK\JMESDK\demos

Activity #3
Go into the C:\Motorola RazrV3 SDK\JMESDK\demos\HelloWorld subdirectory. List the names of the six files you find there on your worksheet. Be sure to include the file extensions for these files. If you don't see them in Explorer, go to Tools --> Folder Options --> View. Make sure that Show Hidden Files and Folders is selected and that Hide Extensions for known file types is not checked. Also, read the HelloWorldReadme file. It contains instructions for creating a jad file. A jad file provides additional instructions to a cell phone for running a java program.


Activity #4

Run the SDK. Run the bounce, helloworld, and paddle ball program. To do that, click the Open JAD File selection under Launch Application. A new window appears. Click the HelloWorld subdirectory and choose MyFirstMidlet.jad. (A midlet, which we discuss, is the name of a Java program that runs on a cell phone.) Select the Motorola Razr V3xx handset. Then click the Run button. The simulated Razr phone should appear on the screen. Run the HelloWorld program. Repeat the process to run bounce and paddle ball.

Activity #5
Create a HelloWorld program in BlueJ that prints: "Hello world from" and then your name. What should appear on the screen when your program is run, for example, is "Hello world from Debbie!" Create a subdirectory under C:\Motorola RazrV3 SDK\JMESDK\demos\ called MyHelloWorld. Copy your files to it, and then run your program in the SDK emulator. See the class blog entry for specific steps on creating all the files, including the jad file, you need.

Activity #6
Modify your Eliza program to run in the SDK emulator. It need to be complete with stringtokenizer and "done" implemented.

Tuesday, January 22, 2008

Class Summary for 1/17/2008 - DOS, file system, and cell hardware


Cell Phone Hardware

We reviewed the three hardware parts of a computer: the central processor unit, memory, and input/output. In a cell phone, we said there was memory and a CPU. There is also a display (output), keyboard (input), bluetooth (both input and output), headphone/microphone jack (both input and output), USB port(input and output), speaker (output), camera (input), microphone (input), and SIM card storage (input and output). Phone numbers, cell phone activation, and other info are stored on the SIM card. Also, SIM cards may be moved from phone to phone.

File System
State: There are several kinds of file systems like CDFS for a CD as well as FAT and NTFS for a hard drive in a computer. Flash disks and floppy drive disks use the FAT file system. A file system describes the way information is organized on a storage disk.

Elaborate: In FAT, CDFS, and NTFS file systems, information is organized in an upside down tree structure. The root, signified by a backslash or \, is at the top. Below the root, there may be sub-directories (also known as subfolders) and files. The sub-directories themselves may contain additional sub-directories and files below them. When we travel through the file system, we name each sub-directory from the root down. When we name the root and each sub-directory below it, it is called a fully qualified path name, abbreviated to FQPN. The current directory is called dot and is symbolized by a period or . The parent directory, one level up, is symbolized by two periods or .. and is called dot dot.

Exemplify: If I am looking for My Documents, the fully qualified path name would be \Documents and Settings\dclingingsmith\My Documents. In this path name, the first backslash is the root, the next lower subdirectory under root is Documents and Settings, below (or inside of) Documents and Settings is another subdirectory called dlclingingsmith. Finally, below the dclingingsmith folder is my My Documents folder. Inside My Documents, I would find my files.

Illustrate: A file system is like an upside-down root system of a tree. Moving through the different levels of the file system is like climbing from branch (or root) to branch in this upside-down tree.

DOS Commands
State: DOS commands are commands typed individually into a Microsoft Windows computer. They are the original commands that existed before Microsoft invented Windows 98 or Windows XP.

Elaborate: There are lots of DOS commands. To run them in Windows XP, a DOS window must be opened. To open a DOS window, go to Start --> Run. A run window will appear. In the run window, type the command cmd. Once the DOS window appears, commands may be entered. The two commands we have used are cd, which stands for change directory and dir which lists the contents of a directory. To exit the DOS window, type the command, exit. For a complete list of DOS commands, see this web site: http://technet.microsoft.com/en-us/library/bb491071.aspx

Exemplify:
To list the contents of a directory, I would type dir. To change to the root, I would type cd \. To change to my My Documents folder, I would type: cd \Documents and Settings\dclingingsmith\My Documents.

Illustrate:
DOS commands are very powerful. They are much like hidden commands. That is, I can go to My Computer and click on the My Documents icon to get to my Word or Excel files. Or, I can use DOS with the cd command also.

Question of the Week - 1/122/08 - 1/25/08 - Second Life

[If you choose to respond to the question of the week, it is due on Friday at 5:00 PM, and must be at least 200 words.]

Question: Would you play second life, invest your money, and build a business?

Background: Second Life is an online virtual community, in some ways similar to the Sims. One assumes an identity, much like a role playing game (RPG) and interacts with others in the community. There is a teen-only as well as an "everyone" version of Second Life (abbreviated SL). Here's some wikipedia info: http://en.wikipedia.org/wiki/Second_Life. However, there is a difference because you can invest real US dollars in SL. One US dollar equals $265 Lindens (that's what SL money is called). You can buy Lindens on ebay. Here's one auction: 1 million Lindens are currently going for $4042.99 (see this auction: http://cgi.ebay.com/L-1000000-1M-LINDEN-LINDENS-DOLLARS-SECOND-2nd-LIFE-SL_W0QQitemZ110216451342QQihZ001QQcategoryZ151538QQcmdZViewItem ) So, what's been happening in SL is that banks have opened up that have been swindling people of their savings with a ponzi scheme (see Wikipedia's explanation of a ponzi: http://en.wikipedia.org/wiki/Ponzi_scheme). It's gotten so bad that banks in SL have been ordered to close by today. See this news article: http://secondlife.reuters.com/stories/2008/01/17/sl-banks-scramble-for-survival-ahead-of-deadline/ So, having a SL persona can be risky. But, one can rent land, build a business, and make real US dollars money there too. Here's one last article from Business Week: http://www.businessweek.com/magazine/content/06_18/b3982001.htm.

Wednesday, January 16, 2008

Question of the week for Week2, 1/14/08-1/18/08

[The question of the week should be at least 200 words. It is due by 5:00 PM on Friday.]

Question: Would you want to be able to control a robot or computer just with your thoughts, even if it meant having a brain implant to connect you to a computer and the Internet?

Background: In the 1995 movie, Johnny Mnemonic, Keneau Reeves plays the role of a futuristic courier who plugs into a computer via a socket behind his ear. See http://movies.yahoo.com/movie/1800238822/info for more info on the movie. A monkey in North Carolina can control a robot in Japan with her thoughts through brain implants. So far fetched? Well, it's happening now. See http://movies.yahoo.com/movie/1800238822/info.

Friday, January 11, 2008

ICA-CP: 1/11/2008 - Q3 quiz #1 and finish Eliza

Good afternoon!

Today is FastFood quiz day. We will spend a few minutes doing last minute questions and answers, then take the quiz for 45 minutes. After the quiz, please work on finishing up your Eliza comments, flow chart, and documentation which are worth 20 points each. They are all due by the end of class today.

Here's the link to our quiz: http://www.quia.com/quiz/1226490.html The class diagram to use with the quiz is called FastFood and may be found here: http://www.slideshare.net/dlclingingsmith

Next week, we begin working on cell phone Java programming.

Wednesday, January 09, 2008

Question of the Week: 1/7/08-1/9/08

(Since we meet three times this week, if you choose this question, it should be 300 words or more. It is due on Friday, 1/9/08, at 5:00 PM)

Here's the question: The 8GB Apple iPhone costs $399.00 to buy, then $50-$80 a month for phone and Internet service. Would you buy it right now, today, with a new iPhone coming out later this year?

Background: People who bought iPhones in the first couple of weeks paid $599 for theirs -- then Apple lowered the price by $200. There's a new iPhone with 3G capability and more memory (maybe double) due out this year. Annoucements about new Apple products usually occur during the MacWorld Expo, which is next week at Moscone Center. Monthly phone and Internet fees are expensive right now, and only available throug AT&T. Hacking your iPhone to work with Sprint or TMobile may break it. But, it IS the best PDA/cell phone combo around right now!

ICA-CP: 1/9/08 - Continue with Eliza documentation

Good afternoon!

Please continue with putting comments in Eliza, making your flow chart, and creating user documentation. Please remember that your documentation is instructions to someone who will run your program. It should include which words a user may type to get your Eliza to respond. It should also include instructions on how to exit your Eliza program. If typing other than the emotive words on you list causes your program to freeze, then that should be explained also.

For your flow chart in Inspiration: your flow chart should follow the logical flow of your program. We will go over that in class today.

A reminder about your quiz on Friday: It will be a 10 question, 45 minute quiz worth 100 points. The class diagram will be about fast food. So, after your quiz on Friday, you will have about 30 minutes to work on your Eliza comments, documentation, and flow chart.

Corrected dates (I put November instead of January by mistake):
Monday, 1/7/08 - Go over Sweet Tooth Factory and quiz. Work on Eliza.
Wednesday, 1/9/08 - Go over any questions on Sweet Tooth Factory. Work on Eliza.
Friday, 1/11/08 - Take quiz. Finish up and turn-in Eliza documentation, comments, and flow chart.

Last reminder: All Eliza documentation is due on Friday at the end of class. So, some of your work will be homework. I suggest the user documentation as the easiest piece of work to do outside of the computer lab.

Monday, January 07, 2008

ICA-CP: 1/7/08 - Happy New Year!

Good afternoon!

Welcome to the new semester!! We have some exciting activities planned for Q3. But, first we have to finish with Eliza. The comments, flow chart, and documentation for your Eliza program are due at the end of class on Friday, 1/11/08. These are each worth 20 points for a total of 60 points for all three. Work that you do not finish in class may be done as homework. We want to be finished with Eliza by the end of this week so we can start programming our Motorola cell phones next week.

Today, if you remember, we are going over the Sweet Tooth Factory class diagram again. There will be a quiz on Friday. It will be similar to the 10-question Sweet Tooth Factory quiz, but with a different class diagram. So, here's our schedule for the week:

Monday, 11/7/08 - Go over Sweet Tooth Factory and quiz. Work on Eliza.
Wednesday, 11/9/08 - Go over any questions on Sweet Tooth Factory. Work on Eliza.
Friday, 11/11/08 - Take quiz. Finish up and turn-in Eliza documentation, comments, and flow chart.