Sunday, December 21, 2014


7th Assignment for OOP Programming

So this assignment we had to take the Stockholding code we did in the previous assignment and add some inheritance to it by adding a "foreign stock". I did fix the issue from the last assignment and this one is using properties properly. What is Inheritance? Inheritance allows us to define a class in terms of another class, which also provides an opportunity to reuse the codes functionality. For example, Dog's and Cat's are different, but they are both Animals. Therefore you could write a Animal class, and write two different inherited classes called Cat and Dog which would both inherit from the Animal class, but would have different variables and information in them.

Here is my inheritance assignment, where the ForeignStockHolding is inheriting from the Stockholding class.