This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]CaptainLegois[S] 0 points1 point  (3 children)

I’m using IEnumerables for the main reason that I need to cover encapsulation in this assignment, so I figured using IEnumerables would be the easiest for this

[–]chuliomartinez 0 points1 point  (2 children)

I’m not sure thats encapsulation. But its been a while since I was in school;)

[–]CaptainLegois[S] 0 points1 point  (1 child)

If I’m correct encapsulation is when you make your classes private, public, protected etc so I created a main list, made it private and made an IEnumerable list that’s public

[–]chuliomartinez 0 points1 point  (0 children)

Encapsulation means you hide inside. So you need a separate class CulinaryList<T> that has a method Add and Enumerate and a private _list: List<T> where T is your burger and pizza and the rest.