Lab 1 - The BMI Calculator

Before you Start

View these videos. In the videos, this model, this view, this controller, and this test.

ePortfolio Entries

Each entry consists of a web page and a zip file.

Programming Environment

Requirement

Build a mobile app that meets the following:

Design

The app must have three components: A model named BMIModel, a view encoded as an XML file, and an activity named BMIActivity. The three must meet the following:

Implementation

This is your first task.

Testing

This is your second task.

Deployment

This is your third task.

Tasks

Complete the following tasks:
  1. Implement the BMI project.
  2. Test your model using a main method and your calculator as oracle.
  3. Deploy your project on the Departmental tablet.
  4. Add the following new method to your model: public String getWeightInPound()
  5. Implement the new method so that it would return the weight stored in the model's state in pounds rounded to the nearest pound (note that the return is a String, not a double).
  6. Have your activity invoke the new method and combine its return with the original one so that the full output becomes like this: "Your weight in pound is xxx and your BMI is xx.x".
  7. Zip only the src folder of your project and name the zip file BMIsrc.zip. You will submit this file together with your ePortfolio entry.
  8. Backup your work! Whether you are working on your own laptop or on a loaner, it is a good habbit to always zip the entire project and save the zip file to your cloud and/or USB flash drive.

Deliverables

Once you have these deliverables ready, ask your TA to mark your lab.