Can anyone help me figure this out?

40 views
Skip to first unread message

lv lv

unread,
Apr 19, 2018, 5:59:31 PM4/19/18
to mitappinv...@googlegroups.com
I dont know how I'm suppose to do this in app inventor, can anyone help me?

Task description

 

Design an application for Android devices that allows the user to enter their information about income and deductions. The application will determine the amount that the user must pay from contributions or the amount you will receive as a refund. The application must have the same interface that is shown in the video in the video and the same functionality All the processes indicated in the video that will be implemented with procedures will be they have to do that way and the values will be received through arguments and will be returned through of the name of the procedure. In addition to the application, you will create a document in MS-Word where you will include images of all the procedures that you created for your application. Under each image, it will indicate what the objective of the procedure, what each of the arguments is used for and what is the value that it returns.


Task: Application Contributions on Income

Introduction

The Androidlandia contributory system works in the following way. Any person able to work must work. People can work for up to three employers. If the person works on his own, then he is his own employer. The total annual income of people is the sum of the income for all your jobs.

 

People are entitled to several deductions from their income that make the amount for which must pay taxes is lower. There is a deduction of $ 5000 for each child who is studying in college. There is a deduction of $ 3000 for other dependents who are not university students. Spouses are included in this line. A person is not counted as dependent on himself. There are other possible deductions that are not detailed in this document but are considered when evaluating what is the contributory responsibility of a person.

 

Employers are responsible for withholding part of the employees' salary. The sum of the withholding of a person's wages will be the tax withheld for purposes of computing the income tax. There is only one scale to determine the tax liability. It is 20% of the income subject to contribution (here it will be known as net income). Net income is the sum of all the income minus the sum of all deductions. After obtaining the income, 20% of it is the contributory responsibility of the individual. That is, the amount you must pay in taxes. Yes, that amount is greater than the amount that the employers retained then the individual must pay the difference. If the amount is less than the amount retained by the employers, then the government of Androidlandia must return the difference (reimbursement) to the individual.



Here is an example.

Procedure procTotalW2


Objective: Determine the total income of an individual

Arguments: x - income with one of the employers and - income with one of the employers  z - income with one of the employers

Result: The method returns as a result the sum of the three values it receives for the arguments

Note that within the procedure it does not use the contents of text boxes, labels or other components external but the values of the arguments. If, for example, you want to send the value of the three-income found in text boxes in the application interface you could invoke the procedure of a way similar to the following:


With this invocation the result that the procedure returns through its name is stored in the text of a label that represents the total income of the individual.

SteveJG

unread,
Apr 19, 2018, 6:11:40 PM4/19/18
to mitappinv...@googlegroups.com
You first need to know how to the financial calculations on paper and determine the steps necessary to do the exercise on paper. Then learn to use the App Inventor compiler to make an App that will do the same thing.  Here are some resources to help you learn to use the AI2 tools  A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  

How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .

You will make extensive use of App Inventor's Math blocks    

Math blocks

to do the financial calculations    and conditional statements  

The way to start, is to do some of the tutorials here   http://appinventor.mit.edu/explore/ai2/tutorials   to learn how to use the App Inventor 2 compiler . Also read the Inventor's Manual mentioned above.  The AI2 Designer screen has a Help menu that should be useful.
This project is not simple.  

Here is how to find some financial apps created with App Inventor 2 that are posted on the MIT Gallery (accessible to you on the App Inventor Designer screen MENU)

The Apps will give you an idea about the type of App you need to construct.  These apps are for the most part, very simple compared to what you need to code but do provide sample code similar to what you will require. The Projects include an aia file (necessary to import the code to your AI Project List).


Regards,
Steve


Chris Ward

unread,
Apr 19, 2018, 7:10:02 PM4/19/18
to mitappinv...@googlegroups.com
Hello Iv Iv

The example given in the Task description:

Procedure procTotalW2

It is good to use a Procedure when the same calculation needs to be repeated a number of times, but using labels "x y z" is very poor coding! Those labels should be named such that you can see what they are for, making it easier to follow your code and reducing the chances of creating hard-to-fathom bugs. So, something like: "IncomeFromEmployer1",  "IncomeFromEmployer2", "IncomeFromEmployer3" would be better than "x, y, z"

Likewise, the names for the Text Box components could be  "tbIncomeFromEmployer1",  "tbIncomeFromEmployer2", "tbIncomeFromEmployer3"
instead of "tbW2A", "tbW2B", "tbW2C".

lv lv

unread,
Apr 20, 2018, 6:10:38 PM4/20/18
to MIT App Inventor Forum
I have to replica this app and Im lost https://gyazo.com/1d5b8c31b15ce6e40f5264461bc82b30

SteveJG

unread,
Apr 20, 2018, 6:24:01 PM4/20/18
to mitappinv...@googlegroups.com
Sorry you are lost; the way to replicate this project is to do the free programming course here http://www.appinventor.org/content/CourseInABox/Intro and  learn how to use the blocks.  This project is complicated but not terribly difficult if you take it one piece at a time.

What have you tried?   Can you reproduce this screen?  Reproducing the screen will give you a framework, however you will have to connect the buttons to perform the required calculations using the Math blocks.

This is a school project, as a result, Forum members will provide advice but YOU have to do the work Iv Iv .

So, what have you tried so far?



Reply all
Reply to author
Forward
0 new messages