Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
Hi,
 
I have this problem in my university I need use interface and abstract class.
I have a class person with this fields> name, datebirth, country, number of soons, name of wife.
 
Plus I need make security question fox example:
The first form ask me about the name of the person , in the next form show me 3 different security question and 5 answers the answers can be country, datebirth, etc.
So I going to have question class abstract, other class for answer. So the program nee be prepare to ad anything class and answer.
 
how can i do this please, sorry my English I am from Peru.
 
Please send me email copy to DELETED@hotmail.com
 
Thanks so much.
 
[Edit]Removed Email[/Edit]
Posted 22-Nov-12 13:25pm
Edited 22-Nov-12 17:31pm
__TR__29K
v2
Comments
__TR__ at 22-Nov-12 22:32pm
   
Never post your email address in any forum. You will receive an email automatically when someone responds to your question.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Clearly what you need to do here is study and learn what interfaces and abstract classes "are," and what they are designed for, and how they are best used, in C#, and .NET.
 
Here on CodeProject you can find several articles/tutorials directly comparing the use of Interfaces with Abstract Classes: I suggest you start here: [^].
 
And, there are many excellent tutorials on the web, and on MSDN. Just Google !
 
No one here is going to do your homework for you. What you present here is too vague, and confused, to start an "answer" to this not-a-question. You kind of imply some kind of "wizard-like" ui that moves from one screen to another, you kind of imply this is some kind of elaborate security clearance system, but it's all too fuzzy to really visualize, at least for me.
 
You need to get clear in your mind: what, in the solution your project implements, requires that you use an abstract class; what requires you use an interface. If it's the case that you could use either an abstract class, or, interface: then you should be able to understand which one is a better choice in the context of your project.
 
Then you need to prototype some code, and do an initial implementation. Then, you can post questions here, giving specific examples from your code, and asking specific questions; and those specific questions can, and will be, I am sure, generously responded to by the many technically excellent minds that help-out, here, on QA.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 279
1 OriginalGriff 190
2 DamithSL 185
3 Peter Leow 105
4 Kornfeld Eliyahu Peter 105
0 OriginalGriff 7,355
1 DamithSL 5,254
2 Sergey Alexandrovich Kryukov 4,942
3 Maciej Los 4,906
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 22 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100