Software Development for Mobile Devices - CT033-3-3-SDMD Page 1 of 26
Level 3 Asia Pacific University of Technology and Innovation
Contents 1.0 Abstract ............................................................................................................................... 4 2.0 Section A: J2ME Game Programming ................................................................................. 5 2.1 Introduction ..................................................................................................................... 5 2.2 Use Case Diagram ............................................................................................................ 5 2.3 User Manual .................................................................................................................... 6 2.3.1 Splash Screen ............................................................................................................ 6 2.3.2 Playing Game Screen ................................................................................................ 7 2.4 Test Report ...................................................................................................................... 9 2.4.1 TEST CASE 1 START SPLASH SCREEN ...................................................................... 9 2.4.2 TEST CASE 2 MAIN MENU NAVIGATION ................................................................ 9 2.4.3 TEST CASE 3 START EASY LEVEL GAME .................................................................. 9 2.4.4 TEST CASE 4 START HARD LEVEL GAME ............................................................... 10 2.4.5 TEST CASE 5 PAUSE GAME ................................................................................... 10 2.4.6 TEST CASE 6 RESUME GAME ................................................................................ 10 2.4.7 TEST CASE 7 REPLAY GAME ................................................................................. 11 2.4.8 TEST CASE 8 RETURN TO MAIN MENU ................................................................ 11 2.4.9 TEST CASE 9 GAME OVER SCREEN ....................................................................... 11 2.4.10 TEST CASE 10 CHECK HIGH SCORE ..................................................................... 12 2.4.11 TEST CASE 11 CLEAR SCORE ............................................................................... 12 2.4.12 TEST CASE 12 EXIT GAME .................................................................................. 12 2.5 Critical Appraisal ............................................................................................................ 13 2.5.1 Future Enhancement .............................................................................................. 13 3.0 Section B: Mobile Data Collector Using Microsoft.Net Compact Framework................... 14 3. 1 Introduction .................................................................................................................. 14 3.2 Use Case Diagram .......................................................................................................... 14 3.3 User Manual .................................................................................................................. 15 3.3.1 Home Page / Default Page...................................................................................... 15 3.3.2 Login Page ............................................................................................................... 15 3.3.3 Ordering Screen ...................................................................................................... 16 3.3.4 Windows Mobile Application ................................................................................. 18 3. 4 Test Case ....................................................................................................................... 20 Software Development for Mobile Devices - CT033-3-3-SDMD Page 2 of 26
Level 3 Asia Pacific University of Technology and Innovation
3.4.1 ASP.net Web Application (data provider) .............................................................. 20 3.4.2 Windows Mobile Application (data consumer) ...................................................... 22 3.5 Critical Appraisal ............................................................................................................ 23 3.5.1 Future Enhancement .............................................................................................. 23 3.6 Conclusion ..................................................................................................................... 24 4.0 Reference .......................................................................................................................... 25
Software Development for Mobile Devices - CT033-3-3-SDMD Page 3 of 26
Level 3 Asia Pacific University of Technology and Innovation
Acknowledgement I would like to thanks to my lecturer, Mr Amad Arshad, who guide me while I am doing this assignment. He had suggested me many ideas on how to improve the games and mobile data collector application. Besides, greatly appreciate too to all my family and friends also, for their valuable suggestion on the project.
Software Development for Mobile Devices - CT033-3-3-SDMD Page 4 of 26
Level 3 Asia Pacific University of Technology and Innovation
1.0 Abstract This assignment was divided to 2 parts. They are J2ME Game Programming and Mobile Data Collector using Microsoft.NET Compact Framework. In part 1, J2ME Game Programming, a mobile game name monster bouncing had been developed. It is controlling a bar to bounce the monster to human for eat human. A details version of user manual and test reports is included in this documentation. The test reports will descript on the game, its outcome, and also its desired outcome. A critical appraisal is shown at the ending for future enhancement suggestion. In part 2, Mobile Data Collector using Microsoft.NET Compact Framework, a McDonalds ordering and tracing application had created. The ordering and managing of orders and customers are developed in ASP.net. However, the tracing application are developed on windows mobile applications. A details version of user manual, test reports and critical appraisal is also included in this documentation too.
Software Development for Mobile Devices - CT033-3-3-SDMD Page 5 of 26
Level 3 Asia Pacific University of Technology and Innovation
2.0 Section A: J2ME Game Programming 2.1 Introduction The aim of this J2ME Game Programming is to apply the advance technical in the programming of mobile device. In this area, a game will be created here named monster bouncing. This game was develop using NetBean in java based. So, it supports most java based device such as Nokia Symbian. In this game, there will be a timer which set to 30 seconds. Players require controlling the bar left and right moving to bounce the monster to eat human. After 30 seconds, the player which hit the monster eat the most people will get the highest score. The score will recorded in the high score area.
2.2 Use Case Diagram
Software Development for Mobile Devices - CT033-3-3-SDMD Page 6 of 26
Level 3 Asia Pacific University of Technology and Innovation
2.3 User Manual 2.3.1 Splash Screen
This is the splash screen for this monster bouncing game. While on this screen, users are allow to choose level for the game. There are 3 levels which are easy, hard, and crazy. User is required to press up for easy mode, down for hard and right for crazy mode. Each different level will provide different movement speed, and generated different numbers of human sprite for hitting.
There will be a menu bar at the bottom this splash screen. It allows user to select to start game, exit, check high score and clearing high score. User can simple hit the fire button, which is the middle button to start game. As shown below. Software Development for Mobile Devices - CT033-3-3-SDMD Page 7 of 26
Level 3 Asia Pacific University of Technology and Innovation
This is the screen which shows user high score. If there is no high score, of score cleared, it will show nothing. 2.3.2 Playing Game Screen
Software Development for Mobile Devices - CT033-3-3-SDMD Page 8 of 26
Level 3 Asia Pacific University of Technology and Innovation
This is the game playing screen. There will be a timer which shows remain time for the game to end. Users are required to control the red bar to hit the monster to eat as much human at they can. Each human eat will give player 1 score. These score are then recorded into a RMS database and shows high score while user choose to see. As usual, a menu bar will show at bottom of the screen. But this time, it shows pause/resume and a menu. If user press menu, will pop up a menu bar as second picture above. It contains exit command, main menu which allow user go back to main menu, and restart game. While playing game or paused game, user press main menu will stop the game and go to main menu. Same goes on restart, even if pause, if user selects to restart it will restart whole game.
The timer will blink red and black when time less than 3 second. This will alert player it is going to end. Right hand side diagram shows the ending of a game, a game over message with how many humans player hits will shows. After few seconds, it will automatically jump back to main menu. User can select start the game again or quit the game at main screen there.
Software Development for Mobile Devices - CT033-3-3-SDMD Page 9 of 26
Level 3 Asia Pacific University of Technology and Innovation
2.4 Test Report 2.4.1 TEST CASE 1 START SPLASH SCREEN Test Case 1 START SPLASH SCREEN Description First screen show to user when they start game, user are allow to select 3 different level from here which are hard, easy, crazy. Outcome User able to select different levels from these screens, after select the level, users are allow to press start game and play the game. Expected Outcome User can select different levels as they like from this screen by pressing up for easy, down for hard and right for crazy. After selecting the level, user is allow to start game. By default if user start directly game will be easy mode.
2.4.2 TEST CASE 2 MAIN MENU NAVIGATION Test Case 2 MAIN MENU NAVIGATION Description A main menu for command execution Outcome Users can choose the exit command, start command, view score command, and clear score and execute it. Expected Outcome User is able to choose the exit command, start command, high score command, and clear score and execute it. Each level have different human number shows and monster movement speed. 2.4.3 TEST CASE 3 START EASY LEVEL GAME Test Case 3 START EASY LEVEL GAME Description Start game by level easy Outcome User can play the easy mode for this Software Development for Mobile Devices - CT033-3-3-SDMD Page 10 of 26
Level 3 Asia Pacific University of Technology and Innovation
game, the monster movement should be slow, human should be many. Expected Outcome User able to play the easy mode for this game, the monster is moving slowly to allow player more time to think and control its movements to hit humans. Humans numbers are generated many to allow player more easier to hit.
2.4.4 TEST CASE 4 START HARD LEVEL GAME Test Case 4 START HARD LEVEL GAME Description Start game by level hard Outcome User can play the hard mode for this game; the monster should be moving fast, human number should be lesser. Expected Outcome User able to play the hard mode for this game with lesser human and faster monster movement speed.
2.4.5 TEST CASE 5 PAUSE GAME Test Case 5 PAUSE GAME Description Game can be pause Outcome User can pause the game while the game is running. The clock, monster and bar should not be able to move or change. Expected Outcome User able pause the game while game is running. All item on the screen freeze while paused, but the human is still increasing.
2.4.6 TEST CASE 6 RESUME GAME Test Case 6 RESUME GAME Software Development for Mobile Devices - CT033-3-3-SDMD Page 11 of 26
Level 3 Asia Pacific University of Technology and Innovation
Description Game can be resume from pause Outcome User can resume the game after pausing. All items on the screen should be able to continue move. Expected Outcome User able to resume the game after pausing, all items on the screen allow move.
2.4.7 TEST CASE 7 REPLAY GAME Test Case 7 REPLAY GAME Description The game can be restart while playing. Outcome User can restart the game while the game is running half way. Expected Outcome User able to restart the game anytime while the game is running. 2.4.8 TEST CASE 8 RETURN TO MAIN MENU Test Case 8 RETURN TO MAIN MENU Description Return to main menu from game Outcome User can return to main menu while playing game Expected Outcome User can return to main menu while playing game, if user want to start back the game, it will be a new game.
2.4.9 TEST CASE 9 GAME OVER SCREEN Test Case 9 GAME OVER SCREEN Description Game over screen is show up Outcome Screen pop out when time finished, it should shows the score player got. Expected Outcome Screen pop out when time finished, it shows the scores of ate people.
Software Development for Mobile Devices - CT033-3-3-SDMD Page 12 of 26
Level 3 Asia Pacific University of Technology and Innovation
2.4.10 TEST CASE 10 CHECK HIGH SCORE Test Case 10 CHECK HIGH SCORE Description high score can be view by players Outcome Players can view the high score, only the highest score will show. Expected Outcome Players able to view the high score, only one highest score shows.
2.4.11 TEST CASE 11 CLEAR SCORE Test Case 11 CLEAR SCORE Description all score stored in RMS database will be deleted by players Outcome Players can delete the high scores Expected Outcome Players able to delete the high scores
2.4.12 TEST CASE 12 EXIT GAME Test Case 12 EXIT GAME Description Game can be exit any time Outcome Player can exit the game while on the splash screen, or even playing game and pausing game. Expected Outcome Player able to exit the game anytime they want.
Software Development for Mobile Devices - CT033-3-3-SDMD Page 13 of 26
Level 3 Asia Pacific University of Technology and Innovation
2.5 Critical Appraisal For this monster bouncing game, there are many parts are stills not yet fully perfects and need to be improved. First is the human in the game, it will continue increasing even when the game is paused, although it has a fixed maximum human limits, but it is still not the best solutions. Next is the game level, it is not perfectly set for players to play. If user selected crazy level, the speed of bouncing of monster will increase. But, while speed increasing, the more movement will done by the monster, and so will hit more human. This will make crazy level seem more easy than easy. Although this was solve by setting the number of human for crazy mode to 2. But it still is not a best solution. Thirdly is high score functions, the high score will store all high score from players. But, the high score is combining from all different level. Even if a player lay for a hard level, the score will compare with all others players from easy and also crazy level too. This will cause imbalance of scoring. So it needs to be improving. 2.5.1 Future Enhancement Current bouncing logic is not well implements. The bouncing actually there is a road. If players play for a long time, they will able to know the bouncing route line. Besides, the bouncing logic is also based on the screen size set. It is hard coded as 320 x 240 sizes. So if installed in others phones such as Nokia X5, the game will run off the screen. For future enhancements, the system should be develops flexible to allow all device to play. Besides, its design of bouncing logic will also need to be change into totally random bouncing to make the game harder. Improve in terms of graphics. The graphics of this monster bouncing game is too low. If possible, for future it should be a 3D game. Besides, currently this monster bouncing is developing to support java device only. For future, it should develop to support others platforms such as android and IOS.
Software Development for Mobile Devices - CT033-3-3-SDMD Page 14 of 26
Level 3 Asia Pacific University of Technology and Innovation
3.0 Section B: Mobile Data Collector Using Microsoft.Net Compact Framework 3. 1 Introduction The aim of mobile data collector using Microsoft.net Compact Framework parts is to apply the advance programming techniques in developing and testing mobile application. For this application will consist of parts, 2 which are a device application as data consumers and a web application as data provider. 1 is the website which allow user to update and manage orders, and add and remove customers. 2 is the windows mobile application parts which allow user to search order details. A McDonalds case is use in this part, where by McDonalds staff will use the web based application to take orders and manage customers information. This information will then store on a XML data source. The customer will use windows mobile application to track their order status by accessing the shared data source. 3.2 Use Case Diagram
Software Development for Mobile Devices - CT033-3-3-SDMD Page 15 of 26
Level 3 Asia Pacific University of Technology and Innovation
3.3 User Manual 3.3.1 Home Page / Default Page
This is the home page or known as default page. Every time user opens the website, this webpage will show first. Users can select to check about McDonalds or also register customer order. 3.3.2 Login Page
Software Development for Mobile Devices - CT033-3-3-SDMD Page 16 of 26
Level 3 Asia Pacific University of Technology and Innovation
However, only authorized used allow to register new order and manage customer data. In this case, the original password and ID is admin and admin.
Login failed will show if wrong user name and password entered. If correct login, then will directly redirect user to the authorized site. 3.3.3 Ordering Screen
Software Development for Mobile Devices - CT033-3-3-SDMD Page 17 of 26
Level 3 Asia Pacific University of Technology and Innovation
This is the order management and customer information management page which after authorized user can view. Authorized user can update, modify, add, and delete customer details, and their orders. These changes will then update into the XML file and read by others device such as the windows mobile application. If user did not press select on the customer grid view, the order information will shows will be combinations of all orders. User can press select on the customer, and view the customers orders only. After view customers order, user can select on order and update it. However, only status allow to update. This is the customer information managing part. At this part, user are allow to key in customer id, customer name, and customer contact. If the data entered wrongly, user can press clear to clear the entire text box. Besides, user can select on the grid view data, and press delete to delete the information. After each process perform, the page will rrfresh for new data show.
The diagram above shows the order information. Each customer can have much different order. In this part, user is allowing to record new order from customer by Software Development for Mobile Devices - CT033-3-3-SDMD Page 18 of 26
Level 3 Asia Pacific University of Technology and Innovation
entering the foods, address, quantity and status. The status will be updated by user after each stage process done. These details will then consume by customers from others device such as windows mobile. Below is demonstration on mobile site to view the information. 3.3.4 Windows Mobile Application
This is the starting page of windows mobile application to view the McDonald ordering tracking. Users are required to enter their user id and search for the details. Software Development for Mobile Devices - CT033-3-3-SDMD Page 19 of 26
Level 3 Asia Pacific University of Technology and Innovation
While user press on the text box, the original text will vanish and user can continue enter their id.
If the order records for the ID user input are not found, then this message will shows. Else a order records are found will be show as below.
Software Development for Mobile Devices - CT033-3-3-SDMD Page 20 of 26
Level 3 Asia Pacific University of Technology and Innovation
The diagram above shows the result after order records found. The details will show below the search order for user to view.
3. 4 Test Case 3.4.1 ASP.net Web Application (data provider) Test Case 1: System Login Test Case 1 System Login Description Allow authorized user such as McDonalds staff to log in Outcome Allow authorized user to log in to perform update, modify, and delete customer and customer orders. Expected Outcome Authorized user can login to the system and perform update, modify, and delete customer and customer orders.
Test Case 2: Add Customers Test Case 2 Add Customer Description add customer to the system for take order Software Development for Mobile Devices - CT033-3-3-SDMD Page 21 of 26
Level 3 Asia Pacific University of Technology and Innovation
Outcome Authorized user can add new customer to the system Expected Outcome user able to add the new customer to the system by entering id, name, and contact number
Test Case 3: Delete for Customer Detail Test Case 3 Delete Customer Description delete customer from the system Outcome user can delete customers from the system database Expected Outcome user able to delete the new customer from the system XML database
Test Case 4: Add Customer Orders Test Case 4 Add New Order Description Add new order to the system Outcome To allow authorized user to add new order for specific customer Expected Outcome Authorized user can add new order details for customers after select the customers details from grid view.
Test Case 5: Delete Customer Orders Test Case 5 Delete Customer Order Description Delete specific customer order from the system database Outcome Authorized user is allow to delete selected customer order from system database Expected Outcome Customer orders are able to remove from database by authorized user. Software Development for Mobile Devices - CT033-3-3-SDMD Page 22 of 26
Level 3 Asia Pacific University of Technology and Innovation
Test Case 6: Update Customer Orders Status Test Case 6 Update Orders Status Description The existing order status can be modify by authorized user Outcome Authorized user can update the order status to preparing, delivered, and delivering. Expected Outcome Authorized user able to update the order status to preparing, delivered, and delivering.
3.4.2 Windows Mobile Application (data consumer) Test Case 1: Enter Customer ID and search Test Case 1 Enter Customer ID and search Description Enter customer ID to perform search Outcome Customer is allow to enter their ID to the textbox in mobile application and search for the ordering details Expected Outcome Customer is able to enter their customer ID into the mobile application, and press search order button. Orders will show to customers.
Software Development for Mobile Devices - CT033-3-3-SDMD Page 23 of 26
Level 3 Asia Pacific University of Technology and Innovation
3.5 Critical Appraisal The main problem in this system is manual ID entering. The customer ID is entered manually by user. Even if a user entered a repeated ID, the system will accept too. This is due to no data verification. Besides, currently this McDonalds mobile data collector system is using ID for searching for details. If the customer had forgotten their ID, they will unable to search for their order. 3.5.1 Future Enhancement For future, this system should be enhancing to allow more searching methods. Besides, the ID can also use easy remember data to store such as using IC numbers. By using this way, the case for forgotten id will be reduced. Besides, in this McDonalds mobile data collector system, customers are allow to search orders only. There are no contact number or complain sites for them to use. If they found the order is wrong, they are unable to contact McDonalds immediately. For future, this system should include contact information such as help lines and websites. So that customer can make immediate inform if there is something wrongs on the order details.
Software Development for Mobile Devices - CT033-3-3-SDMD Page 24 of 26
Level 3 Asia Pacific University of Technology and Innovation
3.6 Conclusion After finished this assignment part 1, I had understand how a mobile applications functions on different platform. Besides, I also had learned how to apply the advance technical in the programming of mobile device well. For example how to use game midlet, game canvas, and tiled layer. Besides, after finish part 2, the Mobile Data Collector using Microsoft.NET Compact Framework, I had learned how to program windows based phone applications. On the other hand, I also learned how to implements share source between mobile application and web based applications. However, both these application are still not the best and need more improvement in them.
Software Development for Mobile Devices - CT033-3-3-SDMD Page 25 of 26
Level 3 Asia Pacific University of Technology and Innovation
4.0 Reference C-sharpcorner.com, (2014). Working With XML File in ASP.NET. [online] Available at: http://www.c-sharpcorner.com/UploadFile/c25b6d/working-with-xml-file- using-Asp-Net/ [Accessed 1 May. 2014]. Dasari, S. (2014). Asp.net Read/insert data into XML file and bind data to DataList - ASP.NET,C#.NET,VB.NET,JQuery,JavaScript,Gridview,SQL Server,Ajax,SSRS, XML examples. [online] Aspdotnet-suresh.com. Available at: http://www.aspdotnet-suresh.com/2010/12/how-to-insert-data-into-xml-and- how-to.html [Accessed 1 May. 2014]. Developer.nokia.com, (2007). Beginners Tutorial for J2ME. [online] Available at: http://developer.nokia.com/community/discussion/showthread.php/114868- Beginners-Tutorial-for-J2ME [Accessed 1 May. 2014]. Docs.oracle.com, (2014). Java ME Embedded: Java Platform, Micro Edition Embedded (Java ME Embedded) 8 Release 8. [online] Available at: http://docs.oracle.com/javame/8.0/index.html [Accessed 2 May. 2014]. J2megame.uw.hu, (2014). J2ME Game Programming. [online] Available at: http://j2megame.uw.hu/ch19lev1sec425.html [Accessed 2 May. 2014]. J2mesalsa.com, (2014). J2ME Tutorials. [online] Available at: http://www.j2mesalsa.com/elearning/ [Accessed 6 May. 2014]. Java.com, (2014). What is J2ME or Java ME?. [online] Available at: http://www.java.com/en/download/faq/whatis_j2me.xml [Accessed 6 May. 2014]. Ltd., D. (2014). J2ME Java Tutorial. [online] Java2s.com. Available at: http://www.java2s.com/Tutorial/Java/0430__J2ME/Catalog0430__J2ME.htm [Accessed 6 May. 2014]. Oracle.com, (2014). Java ME Landing Page. [online] Available at: http://www.oracle.com/technetwork/java/javame/index.html [Accessed 6 May. 2014]. Software, E. (2014). Enough Software: J2ME Polish. [online] Enough.de. Available Software Development for Mobile Devices - CT033-3-3-SDMD Page 26 of 26
Level 3 Asia Pacific University of Technology and Innovation
at: http://www.enough.de/products/j2me-polish/ [Accessed 8 May. 2014]. Tauber, D. (2014). What's J2ME? - O'Reilly Media. [online] Onjava.com. Available at: http://www.onjava.com/pub/a/onjava/2001/03/08/J2ME.html [Accessed 10 May. 2014]. Today.java.net, (2014). J2ME Tutorial, Part 1: Creating MIDlets | Java.net. [online] Available at: https://today.java.net/article/2005/02/07/j2me-tutorial-part-1- creating-midlets [Accessed 13 May. 2014]. Tutorialspoint.com, (2014). XML Tutorials. [online] Available at: http://www.tutorialspoint.com/listtutorials/xml/1 [Accessed 15 May. 2014]. W3schools.com, (2014). ASP.NET Data Binding with XML. [online] Available at: http://www.w3schools.com/aspnet/aspnet_xml.asp [Accessed 15 May. 2014]. W3schools.com, (2014). XML Tutorial. [online] Available at: http://www.w3schools.com/xml/default.ASP [Accessed 18 May. 2014].