reset password
Author Message
kevinmowers@yahoo.com
Posts: 49
Posted 21:58 Jan 28, 2014 |

Should we use a separate class to construct registration data objects like we did when we read in the text and stored an array of courses?

cysun
Posts: 2935
Posted 22:01 Jan 28, 2014 |

Yes, you should create a User class to hold user information like username, password, etc. And then registering a new user becomes kind of like adding a new guest book entry.

kaancalstatela
Posts: 52
Posted 12:42 Jan 30, 2014 |

I was curious whether the user can logout, create a new user, etc. Or is the registration only a one time thing for only one user?

cysun
Posts: 2935
Posted 14:51 Jan 30, 2014 |
kaancalstatela wrote:

I was curious whether the user can logout, create a new user, etc. Or is the registration only a one time thing for only one user?

The assignment does mention logout. I'm not sure what's your distinction between "create a new user" and "registration". If you mean creating a user by another user (e.g. an administrator), the answer is no, you don't need to implement that.

kaancalstatela
Posts: 52
Posted 18:04 Jan 30, 2014 |

The way I did it was I created a user class which I think it's safe to say that it works as an admin class because I instantiated two users during the main page initialization(cysun and cs320stu31) and I made it so that whenever you register, the user info is added to application scope you can then login with that username and password and add/edit classes, logout, register as a new user, etc. Was that the way it was supposed to be or should i change it?

cysun
Posts: 2935
Posted 20:18 Jan 30, 2014 |
kaancalstatela wrote:

The way I did it was I created a user class which I think it's safe to say that it works as an admin class because I instantiated two users during the main page initialization(cysun and cs320stu31) and I made it so that whenever you register, the user info is added to application scope you can then login with that username and password and add/edit classes, logout, register as a new user, etc. Was that the way it was supposed to be or should i change it?

Yes, this is fine.