May 14, 2015 12:04 PM|gerrylowry|LINK
@sbenhoff` welcome to forums.asp.net
you will like find this post useful: http://forums.asp.net/post/5219333.aspx
For questions like "Difference between interface and abstract class", Google and/or your favourite search engine(s) is very helpful:
How can I use interface and abstract class better？
at http://forums.asp.net/post/4792310.aspx, Mike Brind wrote "Abstract classes can include implementations of methods which can be over-ridden in derived classes. Interfaces cannot include
implementations." -- this is something you need to consider.
also read "Recommendations for Abstract Classes vs. Interfaces" https://msdn.microsoft.com/en-us/library/scsyfw1d(v=vs.71).aspx
EDIT # 2:
sbenhoff, regarding your code specifically -- before you show your code to your junior programmers, it would be a good idea to check whether LINQPad and/or Visual Studio is happy
with your code.
Amount = 1; // Invalid token '=' in class, struct, or interface member declaration
Int32 Amount = 1; // this compiles but is flawed
sbenhoff, you need to test your code in an example before giving it to your junior programmers; you also need to think deeply about your example.
public class DollarBill : PaperCurrency
Int32 Amount = 1;
public class Quarter : CoinCurrency
Int32 Amount = 25;
The above code indicates that one Quarter is worth 25 DollarBill -- also, you have this error for both classes:
inconsistent accessibility: base class 'UserQuery.PaperCurrency' is less accessible than class 'UserQuery.DollarBill'
inconsistent accessibility: base class 'UserQuery.CoinCurrency' is less accessible than class 'UserQuery.Quarter'
[you will see "UserQuery" if you're testing with LINQPad]
sbenhoff, your code has other issues ... for example, you may want to consider an enum for dollar, quarter, et cetera.
you may also want to indicate to your junior programmers what culture is intended ... in Canada we have a CDN$2 coin and no longer use CDN 1 cent coins.
sbenhoff, you will discover that creating appropriate training materials often takes much more thought than routine code. FWIW
END EDIT #2.