Giter Site home page Giter Site logo

lottery's Introduction

Mobile Computing Android

Goal:

Build a simple app with a grid layout that helps a person select numbers for a lottery.
Requirements:
1) You must use a grid with a least 12 locations. There must be at least two rows. There must be at least two columns. The widgets must include buttons and TextEdits.
2) The TextEdits allow you to select six numbers for the lottery. Five are regular and can be any value from 1 to 69. The sixth is for the powerball and can be from 1 to 26. The TextEdits in the grid must:
a. Allow the entry of a number.
b. Use white background for the 5 regular numbers and red for the single bonus number.
3) Six Buttons will allow the player to generate a random value and place it in the corresponding TextEdit
a. On click it will generate a random value and put it in the EditText.
b. Use a margin or padding to provide some separation of the buttons.
4) There should be a two buttons and a text view below the grid.
a. The clear button will clear all the values in the EditTexts
b. The Buy button will put the message "Purchased:" followed by all number choices.
c. The TextView will record a ticket purchase

Bonus:

Ø Guarantee that the 5 regular numbers are different before you purchase. If not, set a message "Duplicate number."
Ø Guarantee that the numbers are in the correct range before you purchase. Set a message if not.
Ø When you print the 5 regular numbers on purchase, put them in increasing order.
Ø Add images to the buttons.
Ø Add buttons that will increase the corresponding value by 1.
Ø Add a button that will randomize all the numbers.
Ø Add descriptive labels.
Ø Have the app change the background color of the text when the button is pressed.
Ø Use a TableLayout instead of a GridLayout

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.