Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Convert the following code into javaFX package Sample: import java.io. import java.util.*; class Entry public String first, last, number, note; public class Phonebookfor1510[ public static
Convert the following code into javaFX
package Sample: import java.io. import java.util.*; class Entry public String first, last, number, note; public class Phonebookfor1510[ public static Entryi contactlist; public static int num entries: public static Scanner stdin - new Scanner (System.in): public static void main(String args1) throws Exception int i: char C String code, Command; contactList new Entry[200]; num entries- 0: readPhoneBookFileName: "Phonebook1.txt" Systen. out .printin ("Codes are entered as 1 to 8 characters. Use" + " \"e\" for enter," + " \"f\" for find," 1\ for listing all the entries,a to alphabetize list,"+ to merge entries of the sane name,"+ "V" to quit."); Command = null; while (C!-q System.out.print ("Command: Command stdin. next ( ) ; C = Command, charAt (0); svitch (C) ")i case 'e': addContact ) break; case f: code stdin. next ( ); stdin.nextLine ); i-index (code)i if (i 0) displayContact (contactList [ 1 ] ) ; else Systen.out.printin("**No entry with code "t code) break; case '1' 1istAllContacts) break case a: sortcontactList break: case m: mergeContacts O break: case 'q: CopyPhoneBookToFile(FileName: "PhoneBookl.txt") System.out.printin ("Ouitting the application. All the entries are+ "stored in the file PhoneBook1.txt") break; default: package Sample: import java.io. import java.util.*; class Entry public String first, last, number, note; public class Phonebookfor1510[ public static Entryi contactlist; public static int num entries: public static Scanner stdin - new Scanner (System.in): public static void main(String args1) throws Exception int i: char C String code, Command; contactList new Entry[200]; num entries- 0: readPhoneBookFileName: "Phonebook1.txt" Systen. out .printin ("Codes are entered as 1 to 8 characters. Use" + " \"e\" for enter," + " \"f\" for find," 1\ for listing all the entries,a to alphabetize list,"+ to merge entries of the sane name,"+ "V" to quit."); Command = null; while (C!-q System.out.print ("Command: Command stdin. next ( ) ; C = Command, charAt (0); svitch (C) ")i case 'e': addContact ) break; case f: code stdin. next ( ); stdin.nextLine ); i-index (code)i if (i 0) displayContact (contactList [ 1 ] ) ; else Systen.out.printin("**No entry with code "t code) break; case '1' 1istAllContacts) break case a: sortcontactList break: case m: mergeContacts O break: case 'q: CopyPhoneBookToFile(FileName: "PhoneBookl.txt") System.out.printin ("Ouitting the application. All the entries are+ "stored in the file PhoneBook1.txt") break; defaultStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started