Tuesday, September 26, 2017

CST 338 Week 4

CST 338 Week 4

One example of polymorphism would be video game system. The GameSystem would be the super class with it being divided into two subclasses of home system and portable system. The home system could then have a sub class under it for each specific game system, ie Playstation 4, etc. The home system would inherit all of the methods of the GameSystem class.

An abstract class is a class that contains 1 or more abstract methods. An abstract method is a method that is declared but not implemented. This allows the abstract class to be extended to a subclass which implements the abstract classes methods. By doing this, the non abstract methods can be inherited by the sub class.
An interface is a type that consists of only abstract methods. An interface contains no variables, it only contains method headings that describe each method. A class that implements an interface must also implement all of the interface methods. Since all interface methods are abstract, none of them can be inherited by a class. 

This week was a challenging week as I was out of town at a video game conference from Wednesday through Saturday with little time for school. I was able to do my readings at the conference but could not start programming until Saturday. Just like before there was a lot to digest. I found the problem to be challenging to figure out how to convert the barcode into ascii. Once it was figured out the program became a bit easier to understand. I did a lot of the programming and debugging for our group. I hope to get more practice with polymorphism, abstract classes, and interfaces as I feel I will be utilizing them extensively in my career.

No comments:

Post a Comment