Our final project will be a tax calculator much like the one we started with in Assignment 1. However, we will be making this version far more sophisticated in how it will take in user data, process and calculate taxes, and output all data generated. It will institute file reading, file writing,loops,arrays,logical tests,math calculations, and functions.
File Reading: You have been provided with an input file(input.txt) which you must read and use as the source of input for your program. Your program will have NO INTERFACE for the user. All code will be placed within the FORM LOAD event and needed functions.
This file supplies its data in comma delimited format
Name,gross,401k,city resident,State,age see below
Declare your file objects(sr,fs, and w) begin your file read loop.
Read a line from your file, use the split command to break up that line into the pieces of info that used to come from your interface based inputs.
Functions: ALL of the following calculations MUST be done as functions(AGI,FedAGI,SD, Fedtax,LocalTax,Fica tax,statetax, and netpay.)
Tax rules -
SD: Standard deduction for federal taxes. Based on age. If 65 or older then its 17500, otherwise its 12500
AGI: Gross - 401k (AGI is used for State,Local,Fica taxes and netpay)
FedAGI: gross - 401k - SD(standard deduction) (FedAGI is used only for Federal tax)
Fed tax: FedAGI 0-8500 is 0%,8501 to 10000 is 10%,10001 to 18000 is 12%, 18001 to 35000 is 15%,35001 to 60000 is 18%,60001 to 125000 is 25%, all values over 125000 is 30%
State Tax: Depends on state. Best way on testing is breaking this into and if test for each percentage. Example
If state = "AK" Or state = "AL" ....etc for 2 %
ElseIf state = [test for states in 3% bracket]
Else [we could leave this as an else as if your state isnt in the 2 brackets above it must be in this one]
States A - M 2%,N - O 3%,P - W 4% This function needs to accept ONLY a 2 letter postal abbreviation and AGI, see list of postal abbreviations below
Local Tax: Yes to city resident then its 2% of AGI, otherwise its 1% of AGI
FICA Tax: AGI 0 - 75000 6.2% , AGI above 75000 its 75000 times 6.2% flat
Net Pay: AGI - [Fedtax + statetax + localtax + FICA]
You will be graded not only on your functions working properly but also on how properly they are formed. Example: Declare the netpay function
Function calcnetpay (Byval totaltax as Double, Byval AGI as Double) As Double
Return AGI - totaltax
You would then call this function:
mynetpay = calcnetpay(mytotaltax,myagi)
Improperly declared parameters or function datatypes will result in a loss of points.
File Output: Once you are ready to output your results you will need to output on separate lines: (Name, fedtax,state,local, fica,netpay) Example:
Federal Tax: 2000
State Tax: 1400
Local Tax: 750
Fica Tax: 2400
Your program only needs to output to a single file. Provide a printout of this file and your source code to receive proper credit.
DescriptionIn this final assignment, the students will demonstrate their ability to apply two majorconstructs of the C programming language – Fu
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of