Alright so I've learned this:Classes have public methods that perform operations on the class's data and they hide away their implementations.Data structures on the other hand, completely expose their implementation through properties (getters and setters) and don't usually have methods.So my question is, let's say that I have customer data structure that looks like this:public class Customer{   public string FirstName { get ; set; }   public string LastName { get ; set; }   public List<Offer> Offers { get ; set; }}I would assume this to be a data structure.but what if later during the project, I realize that I need to add some business logic to my customer data structure?Like a method to add new offers because there's more logic in doing so than just adding it to the list?It seems to me that this logic would belong inside of the data structure.What happens then? Does the data structure turn in to a class? Or into some kind of third object type that I'm unaware of?Is this bad design?
Data structures VS Classes and what happens if they merge?
c#;design;data structures;class design
It is not bad design to add a method like that.  This sort of thing's actually very normal when classes are in their infancy.But classes and data structures are a little bit different than you think, and one doesn't really oppose or exclude the other at all.  Most classes are data structures, and many data structures are classes.  Classes have a lot more to do with the syntax of a language - they're programmed into a language directly - whereas datastructures have more to do with how you personally intend to use certain things.  You tell a program what is and is not a class, but you do not generally tell a program what is and is not a data structure - you keep up with the latter yourself.A class might involve methods - or it might not.  It also might involve data - or it might not.  Usually they'll involve both (especially in Java-style languages, where both are required), but this is not always true.  You could even have a class with neither methods nor data.Without getting into any of the details of OOP, a class is mostly just a collection of methods and/or data.  And a class doesn't have to have public members, by the way.  I've used some whose members were all either internal or private, for instance.A data structure is a little different.  It's basically a grouping of data that has been structured in some particular way for some particular purpose.  This may be a class.  Any time you see a class with more than one piece of data, that is generally a data structure.Like a class, a data structure may either contain or forgo methods.  Unlike a class, however, it must contain some form of data (even if the data's just a couple of blank variables).You can have data structures that are not classes.  For instance, imagine if you have two arrays: One is a list of people's first names, and one is a list of people's last names.  And if the nth element of the first array is somebody's first name, then the nth element of the second array is that same person's last name.  Even though the program and the programming language may have no idea these two arrays are connected, you do personally, just because you're keeping up with it.  Even though this is not a good example of how you would usually want to set things up, this still constitutes a data structure.I know that might have been a little long, but hopefully it'll help.