PV178 Programming for .NET Framework
Week 3
Homework #2 - Inheritance, Indexer & IEnumerable
Assignment
- Download a project
PV178.Homework2.zip
. - Look for
TODO
comments and write missing parts. Follow the instructions in the comments.
Chyba: Odkazovaný objekt neexistuje nebo nemáte právo jej číst.
https://is.muni.cz/el/1433/jaro2010/PV178/um/11706605/PV178.Homework2.zip
Submitting
- Submit your homework as three separate files
Square.cs
,Circle.cs
andCanvas.cs
. - Deadline: 23:59 21.3.2010
Tips
- You can see the list of all the
TODO
comments in Task list (View > Task list). - For storing the shapes inside the
Canvas
class, you may use an array, or some collection, that's up to you. - Prior to submitting, compile and test your homework at least with the provided Main method.
Links
Seminar
- inheritance
- keywords:
base
,virtual
,override
,new
andabstract
- early vs. late binding, overriding (
override
) vs. hiding (new
) - sealed classes
- Explicit vs implicit interface implementation
- indexers
- implementing
IEnumerable
,yield return
,yield brake