Need some work done? Post a Project Today
Write a J2ME code program using the http connectivity interface (or file reading interface) to deliver the following functionality:
1. Creating two threads – one for communication (receiving and sending) and the other (main) thread will be for interaction with the user. You will need also additional timer object for added interactivity – e.g. gauge.
2. The main thread will make use of two midlet forms. The first form will ask for web page address (URL) or file name and separately for a delimiter which will separate the words in the URL document, the second form will display the ratio of all symbols on the page and the number of occurrences of the delimiter specified.
3. The second thread should perform http connectivity to the WWW, utilise the web page address supplied and connect to the appropriate web page and read its content, count all symbols on the chosen page, count the number of occurrences of the delimiter given as user input on the same form as the web page address, calculate the ratio between the two and pass this information to the first thread to display.