OOP Examples in C#
May 14, 2020
Inheritance or Composition: Two approaches Inheritance Composition IEnumerable IDisposable IEnumerable and Yield Use StreamReader Base Class
Tips & Thoughts
May 14, 2020
Inheritance or Composition: Two approaches Inheritance Composition IEnumerable IDisposable IEnumerable and Yield Use StreamReader Base Class
May 12, 2020
You can see some sample here from different oop languages: When we write the class for a spaceship in our video game, we’re creating the blueprint to build the spaceship. Now, the blueprint itself isn’t a usable object, but from that class, we can instantiate or create one or more instances of that type of spaceship object. And to do that, many object-oriented languages use the keyword new. In Java, we’d say Spaceship then the variable name myShip equals…
May 12, 2020
After defining requirements and writing some use cases or user stories we start to transition from analysis, understanding the problem we’re trying to solve, to design, how we’re going to organize our solution. Identifying the objects To identify objects, we’ll go through all of our use cases and user stories and any other written requirements to pick out all of the nouns. – That’s one benefit of actually writing out all those descriptions. Identifying class relationships Once we have…
May 11, 2020
After hashing out the feature focused requirements that say what the system or application must do, it’s time to shift focus towards the user and how they accomplish a particular goal, and one way to capture that is as a use case. There isn’t a single right way to write use cases, and they could be written at several levels of formality. But at the very least, a use case…
May 11, 2020
The first step to any design process is to gather your requirements. Figure out what your application or product needs to do. What’s the problem you’re trying to solve? Why are you building the application in the first place? At the core what are the application’s functional requirements? To write the functional requirements, I use the phrase, the system must, or the application must, to describe what it must do. I phrased the non-functional requirements to describe how the…
May 11, 2020
There are four fundamental ideas in object-oriented programming: Abstraction Polymorphism Inheritance Encapsulation the delicious acronym A-P-I-E. A pie! Abstraction Abstraction means we focus on the essential qualities of something rather than one specific example. By using abstraction, we automatically discard what’s unimportant or irrelevant. Focusing on the idea of a person instead of an individual is an example of what fundamental idea in object-oriented programming? abstraction Encapsulation The idea of…