Your no-argument constructor is not going to be very useful. You do realise that the fields are already initialised to default values; 0 for the int, and null for all the objects (Strings). You don't need to use the keyword this yet. All you have to do is to set values for each of the fields in the constructor. You will of course end up with a lot of people who all have the same name email and password!
A constructor with one argument is not a lot better. You can only initialise those fields which have information passed to them. You can't initialise name and expect your constructor to pick up an email address or a password from anywhere. So, if you have a one-argument constructor you can set whichever field that value applies to.
There is an example of a constructor here, in the Java Tutorial. Note that the names of the parameters are slightly different from the names of the fields, so you don't need to write this. You can pass all the arguments as command-line arguments to the main method, but it will make for a long invocation. You could also have some sort of code in your constructor which asks the user to enter the other values. Maybe like this:-I don't think your second request is feasible.
posted 11 years ago
Thank you for the PM. It would have been better to post some of that code on the forum, so everybody can see your solution.
As for the toString() method, you might have something like thisThat is one of several possible ways to organise a toString method. I haven't looked at the rest of the code in detail, but it looks OK just on a 3-second glance.