import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.Arrays; import java.util.Scanner; import java.util.InputMismatchException;...

1 answer below »
Hello i just needed a pseudocode added to thei and pre post headers


import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.Arrays; import java.util.Scanner; import java.util.InputMismatchException; public class Sort { public static void main(String[] args) throws IOException { try { final int SORT_MAX_SIZE = 16; Scanner sc = new Scanner(System.in); int numberOfElements; System.out.print("Enter Number of elemnts: "); numberOfElements = sc.nextInt(); if(numberOfElements > 16 || numberOfElements < 0)="" {="" system.out.println("the="" number="" of="" elememts="" entred="" is="" invald");="" }="" else="" {="" int="" datatype="0;" int="" userchoice;="" boolean="" loop="true;" while="" (loop)="" {="" system.out.println("press="" 1="" to="" select="" dollar");="" system.out.println("press="" 2="" to="" select="" cis22c_dollar");="" system.out.print("select="" your="" option:="" ");="" userchoice="sc.nextInt();" switch="" (userchoice)="" {="" case="" 1:="" {="" datatype="1;" loop="false;" break;="" }="" case="" 2:="" {="" datatype="2;" loop="false;" break;="" }="" default:="" {="" system.out.println("invalid="" input");="" }="" }="" }="" dollar_currency="" dollar_currency[]="new" dollar_currency[numberofelements];="" if(datatype="=" 1)="" {="" for(int="" i="0;" i="">< numberofelements;i++)="" {="" int="" coin,="" note;="" string="" currencyname;="" sc.nextline();="" system.out.print("enter="" currency="" name:="" ");="" currencyname="sc.nextLine();" system.out.print("enter="" number="" of="" coin:="" ");="" coin="sc.nextInt();" system.out.print("enter="" number="" of="" notes:="" ");="" note="sc.nextInt();" dollar_currency="" dc="new" dollar_currency(note,="" coin,="" currencyname);="" dollar_currency[i]="dc;" system.out.println("currency="" added");="" }="" }="" else="" {="" for(int="" i="0;" i="">< numberofelements;i++) { int coin, note; string currencyname; sc.nextline(); system.out.print("enter currency name"); currencyname = sc.nextline(); system.out.print("enter number of coin: "); coin = sc.nextint(); system.out.print("enter number of notes: "); note = sc.nextint(); cis22c_dollar c_dollar = new cis22c_dollar(note, coin, currencyname); dollar_currency[i] = c_dollar; } } dollar_currency newarr [] =merge_sort(dollar_currency, numberofelements); string data =""; file file = new file("outarray.txt"); if (!file numberofelements;i++)="" {="" int="" coin,="" note;="" string="" currencyname;="" sc.nextline();="" system.out.print("enter="" currency="" name");="" currencyname="sc.nextLine();" system.out.print("enter="" number="" of="" coin:="" ");="" coin="sc.nextInt();" system.out.print("enter="" number="" of="" notes:="" ");="" note="sc.nextInt();" cis22c_dollar="" c_dollar="new" cis22c_dollar(note,="" coin,="" currencyname);="" dollar_currency[i]="c_dollar;" }="" }="" dollar_currency="" newarr="" []="Merge_sort(dollar_Currency," numberofelements);="" string="" data="" ;="" file="" file="new" file("outarray.txt");="" if="">
Answered Same DayOct 27, 2021

Answer To: import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import...

Arun Shankar answered on Oct 27 2021
152 Votes
__MACOSX/._Currency program solution
Currency program solution/Sort.java
Currency program...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here