QFD App (Quality Function Deployment) Made in MIT App Inventor
by AmbushArtist in Circuits > Software
226 Views, 2 Favorites, 0 Comments
QFD App (Quality Function Deployment) Made in MIT App Inventor
Using MIT App Inventor I coded a QFD (Quality Function Deployment) which is a decision maker that uses a basic algorithm to decide what option is logically the better choice. This is a very easy app to code, all it takes is some attention to detail. This a fun project for teens and beginner programmers who want a little bit of a challenge.
Supplies
All you need to create the app is a web browser. It is recommended that you download the MIT App Inventor" app from the app store to test your app once it is coded.
Create a New Project
If you haven't already, go to MIT App Inventor and create an account or log in. Then click Create Apps!
Create the Screen 1 Interface
In the design tab,
Make Screen 1. This will be your user interface (UI) this is where all the magic happens.
Note: Make sure that screen one is scroll-able, there is a check box on the right hand side under the Screen 1 tab, you need to check to be true.
Copy the text boxes, buttons, and labels in the pictures above. These will be all the components that the user will be able to see and interact with.
Hints:
A text box is a component that the user will be able to type in.
A label is a box that will display the text you put in it as the programmer, the user will not be able to change labels.
For all text boxes except for the first 2, the check box numbers only should be true.
Code the Screen 1
Copy the code in the photos above. In summary the code will, create a point value for each subject depending on what the user enters into the text boxes (Image 1), create a score for each category for each option depending on what the user puts in the text box, create a total score for each option (Image 2), then it will multiply the score in each category vs the point value then add all the categories up together to create a total score, and finally it will compare the two total values (A vs. B) and will decide the winner based on who has the larger score total (Image 3). Compare your code to the code in image 4 to check your work.
To create a 2nd screen you will need a variable (as seen in image 2) labeled "Screen2Open"
Note: When "Finish Whole" is pressed a start value needs to be created, this will allow you to display the winner on a separate screen.
Create Screen 2
Select "Add Screen" in the top right corner, add 1 button and label it "Reset" type in the box "text" under the properties tab, "Reset"
Add a label right above it.
Note: Add a LABEL not a text box. The user should not be able to edit the text.
Code Screen 2
In the "Blocks" tab in the top right corner, code screen 2. Copy the code in the image above. In summary, the code will,
-when screen 2 opens/initializes, set a global variable to the start value, which is the name of the winner, from screen 1 (see note from step 3)
-On a label display the winner's name
-Allow the reset button to take you back to screen 1.
Test Your App!
Go through and test the app to make sure it works. To do this, you will need the MIT App Inventor app from the app store.
To connect your phone to the code, click on the "Connect" tab on the top, select "AI companion" In the app on your phone, scan the qr code to test the app.