Android CS323 Trish Cornez

Lab 2: Android Basics - User Interface and View-Control-Model



Note: Use a View-Control-Model for ALL apps.





Exercise 1:

  1. Build the Coffee Ordering app exactly as shown in the image.

  2. Rely on the figure to see View types and placement.

  3. Assume a single coffee costs $4.00. Charge an additional $1.00 for chocolate and $.50 for whipped cream, per cup.

  4. You may use the coffee image and backbround color provided.



    Coffee image :

    Background color: #f7eac1





Exercise 2:


  1. Design and build a simple Burger Calorie app for a cafe. You may use the image shown as a guide.

  2. Construct the app so that it is visually interesting.

  3. Patrons should be allowed to choose a burger and options from the burger menu. Radio buttons and check boxes are required.

  4. Assign calories to each patty and burger options.

  5. Compute and display the total calories.

  6. Thoroughly test your application to verify computations.





Exercise 3:

  1. Build the Shipping app shown in the image. Design the app so that it computes shipping costs as soon as the user begins to input data.

  2. Do NOT include a button in this app.

  3. Explore the setOnEditorActionListener to indicate when the user has entered a shipping amount.

  4. All items to be shipped will have a base cost of $3.00 for the first 16 ounces.

  5. All items weighing more than 30 ounces will have a base cost of $4.00.
    In addition, items weighing more than 16 ounces will have an added charge of $.50 for each additional four ounces.

  6. Thoroughly test your computations.