1. Trang chủ
  2. » Công Nghệ Thông Tin

bài tập lập trình android

10 544 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 2,72 MB

Nội dung

CIS 470 Fall 2011 Homework 6is Android Multi-Threading Write an Android application to implement the core of an investment game that operates as follows: Assume $100 is placed in an account at a trust fund Two financial advisers known as ‘GoodNews’ and ‘BadNews’ are assigned to the account Both investors operate independently from one another GoodNews strategy consists in a think for a while on what to (it takes a second each time), and b make an investment decision that always results in a gain The gain is a random value less or equal to $100 The gain is added to the account to increase its value BadNews operates in a similar way; however his decisions always produce a random loss The loss is at most $100 and should be subtracted from the account’s balance The goal of the game is to see whose strategy ‘succeeds’ first The game is limited to a period of time not to exceed 20 seconds The game could terminate before the allocated time if either a the current balance reaches $200 (twice the original allocation), or b the account is depleted and there is no more money Provide an UI showing the following elements: c Elapsed time (20sec max) Use a horizontal ProgressBar or a similar visible control d Account’s balance Use a ProgressBar initially at the middle of the scale Gains move the progress to the right (max scale), losses reduce the progress sending the marker to the left (0 point in the relative scale) e The current value of the account f A written historical sequence of gains and losses g A message indicating the result of the game h Start-Over / Quit buttons Feel free to change anything that improves the specs Happy computing Have fun! CIS470 Fall 2011 Mobile Application Development using Android HOMEWORK Due: Th Sept 22 Please implement a simple FLASHLIGHT Android application The UI should look - at leatst - like the following screen-shots HINT: Use nested Linear Layouts (as discussed in class) to produce the UI for this assignment Test your application in the Emulator Document your code (this will impact your grade) Print the XML LAYOUT and CODE Include SCREENSHOTS showing your application working (use the DDMS screen capture tool) Extra points for improved design and features ! CIS 470 Fall 2011 Mobile Application Development using Android HOMEWORK Due: Th Sept 29 Please implement a PIZZA ORDERING Android application The UI should include the elements given in the sketch below Fill free to improve the design of this interface Functionality: After completing the selection the user pushes the ‘Place Order’ button to send a summary of the order At a future time we will deliver a text-message to the vendor At this point simply display the text summarizing the order using the Toast method Caution: Make sure customer name and phone are provided Default pizza shape to ‘Round Pizza’ Make sure at least one topping is chosen Test your application in the Emulator Document your code (this will impact your grade) Print the XML LAYOUT and CODE Include SCREENSHOTS showing your application working (use the DDMS screen capture tool) Extra points for improved design and features ! CIS470 Assignment Due: Th 6-Oct Create an Android application to accomplish the following goal A drop-down list (Spinner) offers a choice of 2011 vehicles including: Honda Accord Honda Civic Toyota Corolla Toyota Camry Chevrolet Corvette Ford Taurus (any others of your choice) When the user clicks on a vehicle name a second screen is displayed showing a picture of that car and a textView box includes price and other characteristics of the vehicle (HP, mpg, …) A “Back” button on the second screen allows the user to return to the first screen HOMEWORK - Fall 2010 CIS493 (Due: Thu Oct 28) Mobile Application Development Using Android TODO LIST APPLICATION Write an Android App to implement a simple TODO list The app displays a ListView showing a numbered sequence of lines representing tasks that you need to perform The app is controlled by an OPTION MENU offering the following possibilities: Add new entry to the list Delete a task from the list (ask for number and remove) Update the text of a selected task Save TODO list (fake operation – we still have not done file IO) Close app The main layout of the TODO list should be similar to the following: TODO List: Wed Oct 21, 2009 – 1:15 pm EditText box for entering Task’s text or line number ENTER DATA HERE… Buy milk & bread at the supermarket Pick up clothes from the cleaner Make a tee-time for Friday at Manankiki GC Buy present- wedding anniversary next saturday Save List Add entry Close App Delete entry ListView with numbered tasks OPTION MENU Update entry Functionality: Type a new task in the top EditText box Press Menu button, click on Add entry Click on a line The text should be displayed on the EditText box a Write over the text, click Menu > Update entry to modify the TODO list value (clear EditText) b Click on Menu > Delete entry to remove the task from the list (clear EditText) Click on Save List to fake the writing of the list to disk Click on Close to save list and finish application Comment Lecture notes on file IO are available as lesson 15 (web page) HOMEWORK - Fall 2010 CIS493 (Due: Thu Nov 11) Mobile Application Development Using Android CLEVELAND TOUR - LIST APPLICATION Using built-in Android actions In this application a list of Cleveland landmarks is provided When the user clicks on one of them a second screen appears showing two buttons The first button “Map it” display a location map of the selected place, the second button “More Info” takes the user to the site’s webpage The main application is sketched below: Visiting Cleveland Landmarks Cleveland Tower City Browns Football Field Cleveland State University Playhouse Square Art Museum … … Playhouse Square Map it More Info CIS 493 Project RSS Feeds – SQL Databases Fall 2010 – V Matos In this assignment you will produce an Android application to collect headline sports news from any of the professional sport organizations such as the NBA, NFL, LPGA, etc and locally store it into a SQL database For instance the NBA RSS URL is http://www.nba.com/rss/nba_rss.xml This particular source subscribes to the RSS 2.0 standard discussed in class STEPS Create a SQLLITE database, call it myDB Create the table NBANEWS ( Title, Description, PubDate ) You need to transfer and parse the NBA News XML file to your application (see example discussed in class – Lecture 18) Each item extracted from the feed should be stored in the local SQLLITE database (using insert into nbanews values (….) command) Close the database Reopen the database Use a cursor to visit the data saved in the database table (you must use a SQL “select” statement and a cursor for this step) Use Android’s Toast command to show the items’ titles An Image of the RSS Feed: NBA Headlines ( http://www.nba.com/rss/nba_rss.xml ) A Portion of the corresponding XML file NBA.com: News http://www.nba.com/news NBA.com delivers the latest news, video, and scores from around the NBA league. en-us Copyright (c) 2010NBA Media Ventures, LLC All rights reserved. webmaster@nba.com Wed, 17 Nov 2010 01:09:06 EST Wed, 17 Nov 2010 01:09:06 EST NBA.com http://www.nba.com/news http://i.cdn.turner.com/nba/nba/media/nba_rss.jpg 144 38 Wed, 17 Nov 2010 01:06:13 EST Manakiki Golf Course Tee - Hole 1 -81.4324182271957,41.5984273639879,0 Front of Green - Hole 1 -81.433182656765,41.5955730479591,0 Middle of Green - Hole 1 -81.4331665635109,41.5954647298964,0 Back of Green - Hole 1 -81.4331531524658,41.5953664411267,0 Bunker - Hole 1 -81.4327722787857,41.5969992188305,0 ...CIS470 Fall 2011 Mobile Application Development using Android HOMEWORK Due: Th Sept 22 Please implement a simple FLASHLIGHT Android application The UI should look - at leatst - like the... features ! CIS 470 Fall 2011 Mobile Application Development using Android HOMEWORK Due: Th Sept 29 Please implement a PIZZA ORDERING Android application The UI should include the elements given in... HOMEWORK - Fall 2010 CIS493 (Due: Thu Oct 28) Mobile Application Development Using Android TODO LIST APPLICATION Write an Android App to implement a simple TODO list The app displays a ListView showing

Ngày đăng: 03/04/2016, 17:20

TỪ KHÓA LIÊN QUAN

w