CRUD

  • 18
CrUD: Create, Update, Delete. The program runs with one of the following sets of arguments: -c name sex bd -u id name sex bd -d id -i id Argument values: name (String) sex ("m" or "f") bd (birth date in the following format: "04 15 1990") -c (adds a person with the specified arguments to the end of
You can't complete this task, because you're not signed in.
Comments(11)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
18 May, 15:25
PRO TIP!!! This task uses the String[] args bit of the main(String[] args) If you want to test this and run code based on th String[] args in IntelliJ do this: 1. Click on the play button next to public static void main.... 2. Select the last option 'Create solution main'... 3. In the Create Run Configuration window look to Program Arguments 4. Set your arguements here for example: -u 1 Washington m "04 15 1990" or -c Washington m "04 15 1990" This took me a LONG time to figure out, hope it helps someone else.
Nyerges FerencLevel 18 , Bükkábrány
21 March, 17:54
Awesome task, passed for the first time :-) Bit surprised I'm the 304th, though - where are the others?
AttilaLevel 20
15 April, 03:00
Gratulalok ha ez elsore sikerult.
AhmedLevel 22 , Amsterdam
13 August 2019, 03:02
Is the best way to get the last index by using the size method? Like:
System.out.println(allPeople.size() - 1);
Anyone has another idea? I tried the method (lastIndexOf) but it doesn't seems to work
AttilaLevel 20
15 April, 02:58
Haha, my first thought was the same, but it seemed very unprofessional.. So actually it is:
allPeople.indexOf(Object);
Note: This is Java arraylist IndexOf() method, not the same asJava String indexOf() Method.
ulmas9025Level 20 , Tashkent
6 August 2019, 03:18
help my
EwertonLevel 30 , Belo Horizonte
3 July 2019, 14:47
My mistake was: Example input:
-c Washington m "04 15 1990"
What I thought was format:
new SimpleDateFormat("\"MM dd yyyy\"")
What it really was:
new SimpleDateFormat("MM dd yyyy")
Raivo LapiņšLevel 18 , Riga
4 June 2019, 15:45
I think this task is poorly worded. You should probably mention that the main() method or programs entry point takes a list of arguments. I was trying for so long to figure out why my input from the console line doesn't pass the tests although they met requirements. So for those who are struggling as I did - you must work with
main(String[] args)
as input for the program. Don't create your own readers and don't read user input.
Ed MaphisLevel 20 , Painesville
15 June 2019, 17:37
Thanks
JuanfLevel 25 , Vilnius
6 October 2019, 20:55
Thank you so much!
Diana SalvadorLevel 26 , Sintra
5 February, 17:37
Yes, I figured it out now too, after 3h30 hours... It isn't obvious at all.