Hi, please help me 😭 i don't know what to do. We need to create contact management system using java language. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Hi, please help me 😭 i don't know what to do. We need to create contact management system using java language.

Program should ask the user which task he/she wants to do in program:- -Where it can add new contacts including (names, phone number, age, address, email address). -View Contacts -Update Contacts -Delete Contact -Sort Contacts Alphabetically

23rd Nov 2022, 8:37 PM
Lenie
6 Answers
+ 1
Yes, if you post your code, I can review. Save it in Sololearn playground and add the link here.
24th Nov 2022, 12:08 PM
Tibor Santa
Tibor Santa - avatar
+ 3
Have you tried... learning a bit of Java first, and writing it yourself? Create a POJO class to store a single contact with fields, getters and setters. To easily sort contacts, your class can inherit the Comparable interface. Then create another "manager" class which can store multiple contacts in a collection, most likely in a List, because you need to be able to change the size dynamically.
24th Nov 2022, 11:39 AM
Tibor Santa
Tibor Santa - avatar
+ 1
You have put all the code in the main method. You should at least create a separate method for each functionality. As I already wrote, it would make sense to create a separate class whose function is only to store data. So instead of having name[] phoneNumber[] age[] and so on, you would have only a Contact[] or even better would be an ArrayList<Contact> and define the type like class Contact { String name; long phoneNumber; ...(constructor, getters and setters) } To make testing of your code easier, provide at least one test scenario (in comment) with all the inputs that must be provided for your program.
24th Nov 2022, 12:59 PM
Tibor Santa
Tibor Santa - avatar
0
Yeah , Hmm I tried but I don't think if it's correct, can you help me to correct or complete my code ? because I think my code is wrong .
24th Nov 2022, 12:01 PM
Lenie
0
Ok, Thank you so much! ❤️
24th Nov 2022, 12:08 PM
Lenie