i did this code for this question. Write a class called PocketChange that models a handful of change you might find in your pocket. The class has the following specifications:

• Instance Variables - all instance variables are private!
- int toonies - the number of toonies in the user's pocket
- int loonies - the number of loonies in the user's pocket
- int quarters - the number of quarters in the user's pocket
- int dimes - the number of dimes in the user's pocket
- int nickels - the number of nickels in the user's pocket
- int pennies - the number of pennies in the user's pocket
• Methods:
- PocketChange() - default constructor assigns 0 as a default value to all instance variables.
- PocketChange(toonies, loonies, quarters, dimes, nickels, pennies) - sets the values of all the instance variables to the programmer-specified parameter values.
- calculateTotal method will
calculate and return the total amount of money in the user's pocket, based on the values in each of the instance variables.
- toString() - returns a String with the following format:
- Toonies: t
- Loonies: L
- Quarters: q
- Dimes: d
- Nickels: n
- Pennies: p
where t, L, q, d, n, and p are the number of toonies, loonies, quarters, dimes, nickels and pennies.
In the main method:
Write a test program to test your class.
Get user input for the pocket change he has right now. And then calculate the total value of the change. i did this code but there one line that is not working:this(toonies:0,loonies=0,quaters=0,dimes=0,nickels=0,pennies=0);

the code that i did is:
private int toonies;
private int loonies;
private int quaters;
private int dimes;
private int nickels;
private int pennies;

public PocketChange(){
// this(toonies:0,loonies=0,quaters=0,dimes=0,nickels=0,pennies=0);
}
public PocketChange(int toonies,int loonies, int quarters, int dimes, int nickels, int pennies){
this.toonies=toonies;
this.loonies=loonies;
this.quaters=quarters;
this.dimes=dimes;
this.nickels=nickels;
this.pennies=pennies;
}
public double calculateTotal(){
return toonies*2+ loonies*1 +quaters*0.25+dimes*0.10+nickels*0.05+pennies*0.01;
}
public String toString(){
return "Toonies: "+toonies+ "\nLoonies"+loonies+"\nQuaters: "+quaters+
"\ndimes:"+dimes+"\nnickels:"+nickels+"\nPennies"+pennies;
}

looks reasonable. Did you run it?

yes but this line is giving me error: toonies and the semicolon this(toonies:0,loonies=0,quaters=0,dimes=0,nickels=0,pennies=0);

The line of code you commented out is a constructor call for the default constructor. However, it seems like you made a mistake in the constructor call. Instead of using named arguments, you should use regular arguments. Here's how you can fix it:

```java
public PocketChange(){
this(0, 0, 0, 0, 0, 0);
}
```

In this code, the default constructor calls the parameterized constructor with all the values set to 0.

Other than that, your code looks good for the given specifications. You have defined the instance variables correctly, implemented constructors, the `calculateTotal` method, and the `toString` method.

To complete the test program, you can add a main method that creates an instance of the PocketChange class, prompts the user for input, and then calculates and displays the total value of the change. Here's an example:

```java
import java.util.Scanner;

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

System.out.print("Enter the number of toonies: ");
int toonies = scanner.nextInt();
System.out.print("Enter the number of loonies: ");
int loonies = scanner.nextInt();
System.out.print("Enter the number of quarters: ");
int quarters = scanner.nextInt();
System.out.print("Enter the number of dimes: ");
int dimes = scanner.nextInt();
System.out.print("Enter the number of nickels: ");
int nickels = scanner.nextInt();
System.out.print("Enter the number of pennies: ");
int pennies = scanner.nextInt();

PocketChange pocketChange = new PocketChange(toonies, loonies, quarters, dimes, nickels, pennies);
double total = pocketChange.calculateTotal();

System.out.println("Total value of change: $" + total);
}
```

In this test program, it prompts the user for the number of each type of coin and then creates an instance of the PocketChange class. Finally, it calculates the total value of the change and displays the result.

The issue with your code is with the commented line in the default constructor:

```java
public PocketChange(){
// this(toonies:0,loonies=0,quaters=0,dimes=0,nickels=0,pennies=0);
}
```

The correct syntax to call the parameterized constructor with default values is:

```java
public PocketChange(){
this(0, 0, 0, 0, 0, 0);
}
```

By removing the commented part and replacing it with `this(0, 0, 0, 0, 0, 0);`, you are correctly initializing the instance variables of the object with default values.