CREATEACCOUNT



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  Put the code you need help with I havent coded this yet so I dont have anything to show, I am trying to figure out how it would work first.

I am trying to work out how my functions will work in different classes that inherit from each other.

First I have a USER class which I think is called the parent class, which the other classes inherit from.

Next I have a GUEST class, and this class as i said inherits from the USER class, this class has a function called CREATEACCOUNT, and this CREATEACCOUNT function makes use of another function called ENCRYPT

The next class is called REG_USER, and this class also inherits from the USER class, this class has a function called LOGIN, and this LOGIN, function also makes use of the ENCRYPT function, the same one that CREATEACCOUNT uses

So im wondering how do I set this up. At first i was just going to code 2 encrypt functions in each of the classes, but that seems like it would be bad coding.

Do i put the encrypt function into the USER class and let it work through the inheritance?

Or is there another way I am unfamiliar with?
here.
I suggest that the first step is to write down the classes without any implementations the way you find it the most usefull.

Do i put the encrypt function into the USER class and let it work through the inheritance?
That sounds plausible. Again write it down and see how far you get with it.

Or is there another way I am unfamiliar with?
As long as you can solve a problem with things you are familiar with, I think that would be the best way to go.
Topic archived. No new replies allowed.