Question: for S... The... C Sear N COM. GitHub 3.2 Child Tax Credit When filing for federal taxes, a credit is given to tax payers with

 for S... The... C Sear N COM. GitHub 3.2 Child Tax
Credit When filing for federal taxes, a credit is given to tax
payers with dependent children according to the following rules. The first dependent

for S... The... C Sear N COM. GitHub 3.2 Child Tax Credit When filing for federal taxes, a credit is given to tax payers with dependent children according to the following rules. The first dependent child younger than 18 is worth a $1,000.00 credit. Each dependent child younger than 18 after the first child is worth a $500 tax credit each. You will complete a Java program to output a table of dependent children, how much each contributes to a tax credit, and a total child tax credit. Your table should look something like the following. Child Tommy (14) Richard (12) Harold (21) Total Credit: Amount $1000.00 $500.00 $0.00 $1500.00 1. Open the Child.java and ChildCredit.java source files 2. The Child class has already been implemented for you. Note how the Child class is used. Several instances of children have been created and places into a List. Similar to an array, a List stores elements using O-indexing. Each one can be accessed using the get method. For example, kids.get(i) gets the i-th kid. You could also use an enhanced for loop to iterate over the elements in the List. 3. Implement the produceReport method to compute the child tax credit(s) and output a table similar to the one above. Your method should return the grand total of the credit. Each child is an instance of the Child class. Each instance has its own variables so that each child can be a different age. To get a particular child's age, you can use a getter method. For example, to get the age of tom you can use the syntax, ton.getAge() ty MacBook A * I * I NON 3.EE 2 Natural.java Child.java Child Credit.java 1 backage unl.cse; 2 30 import java.util.ArrayList;/ 5 7 * This program produces a report on how much a a tax payer can expect for their 8 * child tax credits. 9 10 * @author skaucke 11 * 12 */ 13 public class ChildCredit { 14 150 /** 16 * Produces a report (printed to the standard output) of how much 17 * of a credit each child receives as well as a grand total. 18 19 * Returns the total child tax credit. 20 21 * @paran kids 22 * @return 23 240 public static int produceReport(List kids) { 25 // TODO: write a loop to iterate over the elements in the child array 26 // and output a table as specified 27 return ; 28 29 } 30 310 public static void main(String args[]) { 32 33 Child tom = new Child("Tommy", 14); 34 Child dick = new Child("Richard", 12); 35 Child harry = new Child("Harold", 21); 36 37 // A list of children above: 38 List kids = new ArrayListo(); 39 kids.add(tom); 40 kids.add(dick) 41 kids.addCharry); 42 43 produceReport(kids)s 44 45 46} 47 R Markers Properties Servers Data Source Explorer Snippets Console Task List JUnit Finished after 0.12 seconds Runs: 10/10 * Errors: 0 Fallures: 0 Failure Trace * 13 2 Natural.java Child.java Child Credit.java 1 package uni.cse; 2 30/ok 4 * A basic data class that models a child. 5 6 * @author Shaucke 7 * 8 */ 9 public class Child { 10 11 private String name; 12 private Integer age; 140 public Child(String name, Integer age) { 15 this.name = name; 16 1 this.age = age; 17 } 18 190 public String getName() { 20 return this.name; 21 } 22 230 public Integer getAge() { 24 return this.age; 25 } 26 270 @Override A28 public String toString() { 29 return this.name + " (" + this.age + ")": 30 31 } 32 R Markers Properties - Servers 13 Data Source Explorer Finished after 0.12 seconds Runs: 10/10 Errors: 0 Snippets Console Task L Failures: 0 Fallu

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!