C# Relationships Between Classes

C# Relationships Between Classes

In the last several tutorials we have gone through the process of identifying several classes that would facilitate a basic CRM application. During the identification phase, we determine business entities, create properties, and scope out methods. Next we separate responsibilities with the goals of reducing coupling and making the code simpler. Now we reach the phase for establishing relationships between classes. The relationships define how objects work together to perform the work needed for the application to run.…

C# Classes For A CRM Application

C# Classes For A CRM Application

So far we have been looking at the specifics of how to create a class in C#, then add properties and methods to it. Now we want to add additional classes to the application. This is a customer relationship management type application so we’ll need things like an Order class, a Product class, an OrderItem class, and maybe a few others. In this tutorial we’ll start building out those classes to work with our existing Customer class while paying attention to thins like Coupling, Cohesion, Separation of Concerns, and Design Patterns.…

How To Add Methods To A Class In C#

How To Add Methods To A Class In C#

In this tutorial we’ll move forward with the Customer class we created in the last episode. Now we want to keep learning object-oriented fundamentals in C#, and to do that we are going to start looking at Methods. Our Customer class is going to need some methods such as Validate(), Retrieve(), and Save() to make it more useful. Properties only hold data, but if we want the class to be able to do work, we need to add these methods.…

Creating C# Class Properties And Tests

Creating C# Classes And Tests

In this tutorial, we are going to start the beginnings of a fictional CRM type application. A customer relationship management system simply keeps track of customers and their related data. We’ll use Visual Studio to build out a new Customer class, then define the properties that we need for a customer. These will include things like the first name, last name, email address, and so on.…

C# Control Statements

C Sharp Control Statements

Software needs a way to make decisions as it makes progress through the execution of code. This is where control flow comes into play. The program control flow is provided to us by use of control statements. These are the special keywords in the C# language that allow the programmer to set up things like branching, looping, and even entire jumps to new points in the program during execution.…