Question: Must use this code: public class Coin{ int value; Coin next; public Coin(int value){ this.value=value; } public void setLink(Coin coin){ this.next=coin; } public Coin getLink(){
Must use this code:
public class Coin{ int value; Coin next; public Coin(int value){ this.value=value; } public void setLink(Coin coin){ this.next=coin; } public Coin getLink(){ return next; } public int getValue(){ return value; } }

Coin Sorting Machine 1. Write a java class called CoinStack.java, which implements CoinStackInterface 2. Write your application named CoinStackApp.java that read coins (three data files are provided for testing purpose): Construct 4 stacks (for penny, nickel, dime, and quarter stack), read coins from the data file then push to their corresponding stacks. For example, if the value is 10, then you need to push that coin to dime stack. 3. The print the four coin stacks as shown below. Hint: You may implement and use the method as spcified below public static void print(CoinStack[] cs) Here is a sample output: Coin Sorting Machine 1. Write a java class called CoinStack.java, which implements CoinStackInterface 2. Write your application named CoinStackApp.java that read coins (three data files are provided for testing purpose): Construct 4 stacks (for penny, nickel, dime, and quarter stack), read coins from the data file then push to their corresponding stacks. For example, if the value is 10, then you need to push that coin to dime stack. 3. The print the four coin stacks as shown below. Hint: You may implement and use the method as spcified below public static void print(CoinStack[] cs) Here is a sample output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
