[Solved]Myu Prjects 2019 1 Spring Eec 15 Microsoft Word Proyecta Cuip E Home Bbcswet Da Pid 69489 Q37208448




myu Prjects _ 2019:1 spring EEC 15 Х | Microsoft word . Proyecta CuiP e Home bbcswet da /pid-6948905 dt content-rid-5888 1644 1 course XLST 51 201 910 proj t%205%20GUI%20Phon Book pdf 1/4 Note 1: This project may be done in pairs, but the pairs cannot be the same as on project Note 2: This final project has both a fixed part and an optional part. Note 3: The optional part is for extra credit, and is somewhat open ended. Up to 150 extra points may be earned through extra credit. Note 4: Extra credit will be based on Human Engineering, Aesthetics, and Code Quality as well as functionality Fixed Part: Consider the phonebook application of Project 4. A solution to this is given at the end of this document. You can use this code or your own code in Project 8 as a basis for this assignment. Either way is fine. For the fixed part of this project (the 250 points) you must extend the program as follows: Extend the record format to allow both a first name and a last name. Keep the limit of 8 characters for the fist name and 8 characrers for the last name . Include a command “a” (for alphabetize) to put the phonebook in alphabetical order Include a command “m” (for merge) to combine entries that may be duplicates or variants for a given person. For example, if John Smith has two entries, combine the notes into one entry, and if the phone numbers are different, put the second number in the notes Construct a Graphical User Interface (GUI) for the user using lavaPX You must make the program object oriented. This means having a separate class for the internal representation of a phonebook, with methods like add, list, or delete. It also means having a separate class for the GUI aspects of the program Optional Part: For the optional part of this project you may extend the program in various ways. Some areas for extension are as follows: Usability and Aesthetics: Make the GUI especially pleasing to see and use. One example would be to make the list command give a nice listing. Human Engineering: Provide good human engineering for the user. This means being very tolerant of user errors and making it easy to use. For exam give the user an option to name the phonebook file, or you might check if the user tries to add another entry with the same name. Also, consider a simple Help might command. . Reliability: Make the program especially reliable. Try to make it so that the le or prevent an array out of bounds error Maintainability: Make the program especially well-structured and readable. . Functionality: Enhance the functionality of the program in various ways, even small ways For functionality, one option is to add a command ‘d’ for delete to delete an entry corresponding to a name typed by the user. Another enhancement would be to check that a find or enter command actually has a non-null string for the name. A little more work would be to check the format of the phone number. For instance, check that a phone number has one of the following valid forms 419-460-1212 419) 460-1212 460-1212 (Note that one can use regular expressions for this.) Yet another option is to usea binary search to retrieve the phone number of a person. Yet another option, likely to be even more work, would be to allow a partial match to find or delete an entry. For example, “Fmi” would match any entry with “mi” in the name, for example “Smith” or “Hermit” or Mitchell. You may use the substring function in Java for this feature Please submit a brief report along with your code documenting the optional features that you might have added in addition to fixed part to get extra credit A solution similar to Project 7 taport java.to. aport java.util elass Entry [ publie String none, number, nete public class PhonebookFor1518 public static EntryD contactlist publte static int mumenertes public statte Sconer stain- new ScannercSystem. f: public stetie void soin(String argsC) throws Excegption int ti char C String code, Conmond fum entries- 0 txt0i ysten ut.rintlCods ore entered ss i to B characters.vse Tfor isting alt the entries Commond nell onnond stin.nexto swltch ( case “1′ listAtlContactsO; break; System, out.printin”Quitting the opplication. Al1 the entries are System. out.printin Invalid command Please enter the command ogain!1 case q “stored in the file PhoneBook1.txt): break default: publle statte void readPhonebook(String Filekome) throws Except ion f Sconner 5-new SconnerCF); while (S.hasNextltne)) f contoctlisnum entries)- new EntryD: contoctlist[num eneries) nome S.nextO: contoctlistinum entries].number S.nextO: contactiistnu.entries).note -5.nessneO s.closeO public stotic veid oddContact0 t String none- stinnextO String nueber contoctitouent Systen.out.printC Enter Notes contoceiisories) notestin.nextiineO System.out.print Enter Number:); number stdin.nextline); contactList num entries) number number; System.out.printC”Enter Notes: “; contoctlistnum entries] note stdin.nextLineO: nu entries public static int index(String Key) t // Function to get the index of a key from an array // if not found, returns -1 for (int i-e; nn-entries; 讠く i++) { if (contactlist[i].nane.equalsIgnoreCaseCKey)) return i; Found the Key, return index return -1 public static void displaycontact(Entry contact) t System.out printlncontact.none+t”+ contact.number+t+ contact.note); public static void listAL1ContactsO nt i ; while Ctum entries) t displaycontact(contoctlist[i]); public static void CopyPhoneBookToFilecString FileNome) throws Exception new PrintStrean out i++) Filedutput Strean out-new Filedutput Strean(Fi leNone): PrintStream for (int P.println(contactlistti amecontactlisttijnunber i-e; i < ne, entries; { tcontacttisttt).note), Show transcribed image text myu Prjects _ 2019:1 spring EEC 15 Х | Microsoft word . Proyecta CuiP e Home bbcswet da /pid-6948905 dt content-rid-5888 1644 1 course XLST 51 201 910 proj t%205%20GUI%20Phon Book pdf 1/4 Note 1: This project may be done in pairs, but the pairs cannot be the same as on project Note 2: This final project has both a fixed part and an optional part. Note 3: The optional part is for extra credit, and is somewhat open ended. Up to 150 extra points may be earned through extra credit. Note 4: Extra credit will be based on Human Engineering, Aesthetics, and Code Quality as well as functionality Fixed Part: Consider the phonebook application of Project 4. A solution to this is given at the end of this document. You can use this code or your own code in Project 8 as a basis for this assignment. Either way is fine. For the fixed part of this project (the 250 points) you must extend the program as follows: Extend the record format to allow both a first name and a last name. Keep the limit of 8 characters for the fist name and 8 characrers for the last name . Include a command “a” (for alphabetize) to put the phonebook in alphabetical order Include a command “m” (for merge) to combine entries that may be duplicates or variants for a given person. For example, if John Smith has two entries, combine the notes into one entry, and if the phone numbers are different, put the second number in the notes Construct a Graphical User Interface (GUI) for the user using lavaPX You must make the program object oriented. This means having a separate class for the internal representation of a phonebook, with methods like add, list, or delete. It also means having a separate class for the GUI aspects of the program
Optional Part: For the optional part of this project you may extend the program in various ways. Some areas for extension are as follows: Usability and Aesthetics: Make the GUI especially pleasing to see and use. One example would be to make the list command give a nice listing. Human Engineering: Provide good human engineering for the user. This means being very tolerant of user errors and making it easy to use. For exam give the user an option to name the phonebook file, or you might check if the user tries to add another entry with the same name. Also, consider a simple Help might command. . Reliability: Make the program especially reliable. Try to make it so that the le or prevent an array out of bounds error Maintainability: Make the program especially well-structured and readable. . Functionality: Enhance the functionality of the program in various ways, even small ways For functionality, one option is to add a command ‘d’ for delete to delete an entry corresponding to a name typed by the user. Another enhancement would be to check that a find or enter command actually has a non-null string for the name. A little more work would be to check the format of the phone number. For instance, check that a phone number has one of the following valid forms 419-460-1212 419) 460-1212 460-1212 (Note that one can use regular expressions for this.) Yet another option is to usea binary search to retrieve the phone number of a person. Yet another option, likely to be even more work, would be to allow a partial match to find or delete an entry. For example, “Fmi” would match any entry with “mi” in the name, for example “Smith” or “Hermit” or Mitchell. You may use the substring function in Java for this feature Please submit a brief report along with your code documenting the optional features that you might have added in addition to fixed part to get extra credit
A solution similar to Project 7 taport java.to. aport java.util elass Entry [ publie String none, number, nete public class PhonebookFor1518 public static EntryD contactlist publte static int mumenertes public statte Sconer stain- new ScannercSystem. f: public stetie void soin(String argsC) throws Excegption int ti char C String code, Conmond fum entries- 0 txt0i ysten ut.rintlCods ore entered ss i to B characters.vse Tfor isting alt the entries Commond nell onnond stin.nexto swltch (
case “1′ listAtlContactsO; break; System, out.printin”Quitting the opplication. Al1 the entries are System. out.printin Invalid command Please enter the command ogain!1 case q “stored in the file PhoneBook1.txt): break default: publle statte void readPhonebook(String Filekome) throws Except ion f Sconner 5-new SconnerCF); while (S.hasNextltne)) f contoctlisnum entries)- new EntryD: contoctlist[num eneries) nome S.nextO: contoctlistinum entries].number S.nextO: contactiistnu.entries).note -5.nessneO s.closeO public stotic veid oddContact0 t String none- stinnextO String nueber contoctitouent Systen.out.printC Enter Notes contoceiisories) notestin.nextiineO
System.out.print Enter Number:); number stdin.nextline); contactList num entries) number number; System.out.printC”Enter Notes: “; contoctlistnum entries] note stdin.nextLineO: nu entries public static int index(String Key) t // Function to get the index of a key from an array // if not found, returns -1 for (int i-e; nn-entries; 讠く i++) { if (contactlist[i].nane.equalsIgnoreCaseCKey)) return i; Found the Key, return index return -1 public static void displaycontact(Entry contact) t System.out printlncontact.none+t”+ contact.number+t+ contact.note); public static void listAL1ContactsO nt i ; while Ctum entries) t displaycontact(contoctlist[i]); public static void CopyPhoneBookToFilecString FileNome) throws Exception new PrintStrean out i++) Filedutput Strean out-new Filedutput Strean(Fi leNone): PrintStream for (int P.println(contactlistti amecontactlisttijnunber i-e; i
Expert Answer
Answer to myu Prjects _ 2019:1 spring EEC 15 Х | Microsoft word . Proyecta CuiP e Home bbcswet da /pid-6948905 dt content-rid-588… . . .
OR

