Essay Help Services

ITC538 | Basic Algorithms in Java | IT

Home Recent Questions ITC538 | Basic Algorithms in Java | IT

Task 1
The Australian Government will introduce a new personal income tax for 2018-2019. The personal income tax is calculated based on filing status and taxable income. There are four filing statuses: single filers, married filing jointly, married filing separately, and head of household. The tax rates vary every year. The following table shows the rates for 2018-2019. If you are, say, single with a taxable income of $10,000, the first $8,350 is taxed at 10% and the other $1,650 is taxed at 15%. So, your tax is $1,082.5.
You need to write a program to compute the personal income tax. Your program should prompt the user to enter the filing status and taxable income and compute the tax. Enter 0 for single filers, 1 for married filing jointly, 2 for married filing separately, and 3 for head of household.

Here are sample runs of the program:
Sample 1:

Enter the filing status: 0
Enter the taxable income: 100000
Tax is 21720.0

Sample 2:
Enter the filing status: 1
Enter the taxable income: 300339
Tax is 76932.87

Sample 3:
Enter the filing status: 2
Enter the taxable income: 123500
Tax is 29665.5

Sample 4:
Enter the filing status: 3
Enter the taxable income: 4545402
Tax is 1565250.7

Task 2
Problem Description:

Write a Java program to solve the problem presented below. You may assume that the user will always enter valid data; you do not have to perform data validation. The entry charges to a zoo are:

Children 5 years old and younger: free
Accompanied children from 6 to 15 years old: $2 each
Unaccompanied children from 6 to 15 years old: $5 each
Adults from 16 to 59 years old: $10 each
Seniors from 60 years and older: $8 each
An accompanied child is defined as one in a family group accompanied by an adult or a senior. An adult or senior can only count as accompanying one child from 6 to 15 years old. No limit is placed on the number of children 5 years old and younger, which is perhaps a failing on the part of the zoo authorities, but simplifies your problem. Ages are integers.

Your program will calculate and display the entry charge for each family group and also display the total takings for a sequence of groups. In this process it will correctly determine the number of accompanied children and those not counted as accompanied in each family group. It will request the user to enter the number of children (6 – 15 years old), the number of adults (16 – 59 years old) and the number of seniors (60+ years old) for each group, and it will display the entry charge for each group.
The following shows a sample run.
Enter a group? (Yes=1/No=0): 1
Enter the number of children (age 6–15): 5
Enter the number of adults (age 16–59): 2
Enter the number of seniors (age 60+): 1
Total entry charge is $44
Enter a group? (Yes=1/No=0): 1
Enter the number of children (age 6–15): 1
Enter the number of adults (age 16–59): 2
Enter the number of seniors (age 60+): 0
Total entry charge is $22
Enter a group? (Yes=1/No=0): 0
Total takings: $66

You need to submit java and class files, a short discussion to explain the logic on how the problem has been solved, and sample output (for detail please see marking guide and presentation below).

Rationale
This assessment task will assess the following learning outcome/s:

• be able to design and implement algorithms in Java.
• be able to apply testing and debugging techniques in program development.

Similar Posts

Order Now

Latest Reviews

Facebook

Payments And Security