I need(1. The Java source code file (e.g., HW7_1.java) 2. The initial database of accounts file (initAccts.txt) 3. The test cases input file (e.g., testCases.txt) 4. The program generated output file (e.g., output.txt)
1. All output must be file directed (you must add additional parameters to the methods as needed) 2. Only output must go to the file - not interactive prompts or menus (which go to the monitor). 3. No global variables are allowed 4. The program and all methods must be properly commented. 5. The program must be properly tested. a. The initial database should consist of at least 7 accounts b. The initial database should be printed to the file c. Test at least 2 invalid menu selections d. Test at least 2 balance inquiries: i. valid account ii. invalid account e. Test at least 3 deposits: i. valid account - valid deposit amount ii. valid account - invalid deposit amount iii. invalid account f. Test at least 4 withdrawals: i. valid account - valid withdrawal amount ii. valid account - invalid withdrawal amount iii. valid account - insufficient funds iv. invalid account g. Create at least 3 new accounts with an initial balance of 0.0 h, Test the creation of at least 1 invalid new account i. Test several transactions on the new accounts (deposits, withdrawals, etc.)
General GuidanceThe answer provided below has been developed in a clear step by step manner.Step: 1.lcWjel{margin:0;font-family:"Aspira Webfont","Helvetica","Arial",sans-serif;font-size:0.75rem;box-sizing:border-box;}/*!sc*/ data-styled.g366[id="sc-mwpquf-0"]{content:"lcWjel,"}/*!sc*/ .loOCZZ{margin:0;font-family:"Aspira Webfont","Helvetica","Arial",sans-serif;}/*!sc*/ .loOCZZ .align-left{text-align:left;}/*!sc*/ .loOCZZ .align-center{text-align:center;}/*!sc*/ .loOCZZ .align-right{text-align:right;}/*!sc*/ data-styled.g367[id="sc-mwpquf-1"]{content:"loOCZZ,"}/*!sc*/ .cpESDm .DraftEditor-editorContainer,.cpESDm .DraftEditor-root,.cpESDm .public-DraftEditor-content{height:inherit;text-align:initial;}/*!sc*/ .cpESDm .public-DraftEditor-content[contenteditable='true']{-webkit-user-modify:read-write-plaintext-only;}/*!sc*/ .cpESDm .DraftEditor-root{position:relative;}/*!sc*/ .cpESDm .DraftEditor-editorContainer{background-color:rgba(255,255,255,0);border-left:0.1px solid transparent;position:relative;z-index:1;}/*!sc*/ .cpESDm .public-DraftEditor-block{position:relative;}/*!sc*/ .cpESDm .DraftEditor-alignLeft .public-DraftStyleDefault-block{text-align:left;}/*!sc*/ .cpESDm .DraftEditor-alignLeft .public-DraftEditorPlaceholder-root{left:0;text-align:left;}/*!sc*/ .cpESDm .DraftEditor-alignCenter .public-DraftStyleDefault-block{text-align:center;}/*!sc*/ .cpESDm .DraftEditor-alignCenter .public-DraftEditorPlaceholder-root{margin:0 auto;text-align:center;width:100%;}/*!sc*/ .cpESDm .DraftEditor-alignRight .public-DraftStyleDefault-block{text-align:right;}/*!sc*/ .cpESDm .DraftEditor-alignRight .public-DraftEditorPlaceholder-root{right:0;text-align:right;}/*!sc*/ .cpESDm .public-DraftEditorPlaceholder-root{color:#9197a3;position:absolute;width:100%;z-index:1;}/*!sc*/ .cpESDm .public-DraftEditorPlaceholder-hasFocus{color:#bdc1c9;}/*!sc*/ .cpESDm .DraftEditorPlaceholder-hidden{display:none;}/*!sc*/ .cpESDm .public-DraftStyleDefault-block{position:relative;white-space:pre-wrap;}/*!sc*/ .cpESDm .public-DraftStyleDefault-ltr{direction:ltr;text-align:left;}/*!sc*/ .cpESDm .public-DraftStyleDefault-rtl{direction:rtl;text-align:right;}/*!sc*/ .cpESDm .public-DraftStyleDefault-listLTR{direction:ltr;}/*!sc*/ .cpESDm .public-DraftStyleDefault-listRTL{direction:rtl;}/*!sc*/ .cpESDm .public-DraftStyleDefault-ol,.cpESDm .public-DraftStyleDefault-ul{margin:16px 0;padding:0;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth0.public-DraftStyleDefault-listLTR{margin-left:1.5em;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth0.public-DraftStyleDefault-listRTL{margin-right:1.5em;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth1.public-DraftStyleDefault-listLTR{margin-left:3em;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth1.public-DraftStyleDefault-listRTL{margin-right:3em;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth2.public-DraftStyleDefault-listLTR{margin-left:4.5em;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth2.public-DraftStyleDefault-listRTL{margin-right:4.5em;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth3.public-DraftStyleDefault-listLTR{margin-left:6em;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth3.public-DraftStyleDefault-listRTL{margin-right:6em;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth4.public-DraftStyleDefault-listLTR{margin-left:7.5em;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth4.public-DraftStyleDefault-listRTL{margin-right:7.5em;}/*!sc*/ .cpESDm .public-DraftStyleDefault-unorderedListItem{list-style-type:square;position:relative;}/*!sc*/ .cpESDm .public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth0{list-style-type:disc;}/*!sc*/ .cpESDm .public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth1{list-style-type:circle;}/*!sc*/ .cpESDm .public-DraftStyleDefault-orderedListItem{list-style-type:none;position:relative;}/*!sc*/ .cpESDm .public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listLTR:before{left:-36px;position:absolute;text-align:right;width:30px;}/*!sc*/ .cpESDm .public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listRTL:before{position:absolute;right:-36px;text-align:left;width:30px;}/*!sc*/ .cpESDm .public-DraftStyleDefault-orderedListItem:before{content:counter(ol0) '. ';counter-increment:ol0;}/*!sc*/ .cpESDm .public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth1:before{content:counter(ol1,lower-alpha) '. ';counter-increment:ol1;}/*!sc*/ .cpESDm .public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth2:before{content:counter(ol2,lower-roman) '. ';counter-increment:ol2;}/*!sc*/ .cpESDm .public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth3:before{content:counter(ol3) '. ';counter-increment:ol3;}/*!sc*/ .cpESDm .public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth4:before{content:counter(ol4,lower-alpha) '. ';counter-increment:ol4;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth0.public-DraftStyleDefault-reset{counter-reset:ol0;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth1.public-DraftStyleDefault-reset{counter-reset:ol1;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth2.public-DraftStyleDefault-reset{counter-reset:ol2;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth3.public-DraftStyleDefault-reset{counter-reset:ol3;}/*!sc*/ .cpESDm .public-DraftStyleDefault-depth4.public-DraftStyleDefault-reset{counter-reset:ol4;}/*!sc*/ .cpESDm .public-DraftStyleDefault-ltr{text-align:inherit;}/*!sc*/ .cpESDm .public-DraftStyleDefault-rtl{text-align:inherit;}/*!sc*/ data-styled.g370[id="sc-mwpquf-4"]{content:"cpESDm,"}/*!sc*/ .jhimFq{margin:0;font-family:"Aspira Webfont","Helvetica","Arial",sans-serif;box-sizing:border-box;border:2px solid transparent;}/*!sc*/ .jhimFq h2{font-size:16px;}/*!sc*/ .jhimFq h3{font-size:14px;}/*!sc*/ data-styled.g371[id="sc-mo29cs-0"]{content:"jhimFq,"}/*!sc*/ .iQAUeM{margin:0;font-family:"Aspira Webfont","Helvetica","Arial",sans-serif;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:16px;}/*!sc*/ data-styled.g582[id="sc-z3f5s1-0"]{content:"iQAUeM,"}/*!sc*/ .bVFlsN{margin:0;}/*!sc*/ data-styled.g587[id="sc-1swtczx-0"]{content:"bVFlsN,"}/*!sc*/ .gpAhdE{margin:0;font-family:"Aspira Webfont","Helvetica","Arial",sans-serif;line-height:normal;}/*!sc*/ data-styled.g602[id="sc-1sugbjn-0"]{content:"gpAhdE,"}/*!sc*/ Code:Appointment.javapublic class Appointment {// data membersString type;int patientID;String patientName;String appointmentDateTime;String doctorName;String details;public Appointment(String type, int patientID, String patientName, String appointmentDateTime, String doctorName,String details) {this.type = type;this.patientID = patientID;this.patientName = patientName;this.appointmentDateTime = appointmentDateTime;this.doctorName = doctorName;this.details = details;}// getter methodspublic String getType() {return type;}public int getPatientID() {return patientID;}public String getPatientName() {return patientName;}public String getAppointmentDateTime() {return appointmentDateTime;}public String getDoctorName() {return doctorName;}public String getDetails() {return details;}// setter methodspublic void setType(String type) {this.type = type;}public void setPatientID(int patientID) {this.patientID = patientID;}public void setPatientName(String patientName) {this.patientName = patientName;}public void setAppointmentDateTime(String appointmentDateTime) {this.appointmentDateTime =appointmentDateTime;}public void setDoctorName(String doctorName) {this.doctorName = doctorName;}public void setDetails(String details) {this.details = details;}}SQUStudentsClinic.javaimport java.io.BufferedWriter;import java.io.File;import java.io.FileNotFoundException;import java.io.FileWriter;import java.io.IOException;import java.util.ArrayList;import java.util.Scanner;import java.util.StringTokenizer;//class definitionpublic class SQUStudentsClinic {// variablestatic Scanner inp;static ArrayList<Appointment> schedule;// showing the menu option to resceptioniststatic void menu() {// printing the menu options availableSystem.out.println("Which service do you want?");System.out.println("tPress "1" to schedule an appointment");System.out.println("tPress "2" to check appointment");System.out.println("tPress "3" to cancel an appointment");System.out.println("tPress "4" to reschedule an appointment");System.out.println("tPress "#" to exit");}// driver methodpublic static void main(String[] args) throws FileNotFoundException, IOException {// variableschar choice;// creating object to read the clinic appointment dataScanner file = new Scanner(new File("Clinic Appointments.txt"));// arrayList to store the appointment informationschedule = new ArrayList();StringTokenizer stk;// showing the input file contentwhile (file.hasNext()) {stk = new StringTokenizer(file.nextLine(), "|");while (stk.hasMoreTokens()) {if (stk.nextToken().trim().equalsIgnoreCase("Emergency")) {schedule.add(new Appointment("Emergency", Integer.parseInt(stk.nextToken().trim()),stk.nextToken().trim(), stk.nextToken().trim(), stk.nextToken().trim(),stk.nextToken().trim()));} else {schedule.add(new Appointment("Routine", Integer.parseInt(stk.nextToken().trim()), stk.nextToken().trim(),stk.nextToken().trim(), stk.nextToken().trim(), stk.nextToken().trim()));}}}// creating object for taking user inputinp = new Scanner(System.in);// clinic message headerSystem.out.println("*** Welcome to SQU student's clinic ***");// loop until user wish to exitdo {// calling method to show menumenu();// storing the user choicechoice = inp.next().charAt(0);inp.nextLine();// using switch to decide the user operationswitch (choice) {case '1':schedule_appointment();break;case '2':check_appointment();break;case '3':cancel_appointment();break;case '4':reschedule_appointment();break;case ' ... See the full answer