Download 16.91 Kb.

Name: ____________________________ Date: _________________________ App Inventor: Lab 2 – Simple Calculator A. NotesDevelopers often need to modify both text and numeric data. Number Systems Numeric data is represented using the binary (base 2) number system within every computer. Since binary numbers of any significant value require a large number of digits we represent numeric values using base 10 or decimal numbers within App Inventor instead of using binary numbers. Math operators Every programming language provides a base set of math operators. The basic math operations can be found in the Math drawer in the Blocks Editor. It is important to remember that the fundamental Mather operation order of precedence applies in App Inventor. BEDMAS – Brackets, Exponents, Division, Multiplication, Addition, Subtraction In App Inventor we use nested blocks instead of brackets. This will become more important in later labs. Text operators The App Inventor text methods are located in the Text drawer in the Blocks Editor. New strings can be created using App Inventor text methods (join or make text). There are many other methods available that you may wish to explore. B. Learning ObjectivesIn this lab you will learn how to use:
C. Application DescriptionThis project involves designing a simple calculator. Input will be provided as two (2) different text boxes for the numbers being evaluated. The user should be able to perform addition, subtraction, multiplication and division operations. When the operation button is pressed the following output should be given:
Screen Arrangements GUI component placement can be controlled using the Screen Arrangement components (HorizontalArrangement, VerticalArrangement or TableArrangement). To place components in fixed locations you should:
TextToSpeech (Output) To use the TextToSpeech feature you must add a NonGUI component to your application (use the Component Designer to add the component to your project). Example: This block shown above would simply speak the phrase "Hello everyone." Design Your first steps for the project should include the design of your user interface. A sample screen layout and set of components are given below. D. TasksDevelopment typically follows many cycles of design, code, and test. Complete each of these phases. Phase 1 Implement the Add/Subtract operations using 2 different textboxes for input values and test your application. Phase 2 Add the features for Multiplication and Division. Phase 3 Add a feature to have the result spoken to the user. When you have completed all three (3) phases you may submit your application for evaluation. 
search 