Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that displays a simulated paycheck. Theprogram should ask the us

ID: 3618670 • Letter: W

Question

Write a program that displays a simulated paycheck. Theprogram should ask the user to enter the date, the payee's name,and the amount of the check. It should then display asimulated check with he dollar amount spelled out, as shownhere.
                                                                                                           Date: 11/24/2007
Pay to the Order of:    JohnPhillips                                                             $1920.85
One thousand nine hundred twenty and 85 cents

it should have a border around it (simulating a check) Thankyou.

Explanation / Answer

please rate - thanks import java.io.*; public class check{ public static void main(String[] args)throwsFileNotFoundException {String input; Stringnumbers[]={"zero","One","Two","Three","Four","Five","Six","Seven","Eight",                    "Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen",                    "Sixteen","Seventeen","Eighteen","Nineteen"}; String tens[]={"Twenty ","Thirty ","Forty ","Fifty ","Sixty","Seventy ","Eighty ","Ninty "}; String amount,date,name; Scanner in=new Scanner(System.in); String stars[]={"","*","**","***","****","*****","******"}; int dot=0, i,cents,digits,number,decimal,temp,pow[]={1,10,100,1000,1000,100000}; System.out.print("Enter the checks date: "); date=in.nextLine(); System.out.print("Enter the checks receipient: "); name=in.nextLine(); System.out.print("How much is the check for? "); amount=in.nextLine(); //get the amount for(i=0;i1)                    {System.out.print(tens[number-2]);                     if(decimal==0)             //last digit 0 done                       i--;                    break;                   }                  else                    {System.out.print(numbers[number*10+decimal]);                    i--;               //done                    break;                    }            case1:System.out.print(numbers[number]);                 break;           }           }           } System.out.print(" and "); for(i=dot+1;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote