Open francepack opened 4 years ago
I changed the class names to pascalCase.. oops!
drinkMenu forestRoom5DrinkMenu rocksGlass libbyGlass100100
I see now that glass could be any type of glass :/!! I changed it to a rocksGlass and kept the same object as a libbyGlass#. I added ice boolean and straw boolean attributes. Methods- useStraw (modifies straw attribute to true and modifies the contents array to include straw) and addIce (modifies the ice attribute to true and contents array to include ice) methods. I was wondering about a boolean for a servedUp attribute. This means, the rocks glass could be served martini style (shaken) with no ice. Would it be as simple as servedUp is false? Which would modify the ice boolean attribute to true and the contents array attribute to include ice (my new attribute and method)?
For the menu, I was thinking a multiple page/book style menu that requires being open to read (just so you know where my thinking was at). I added a pictures array (addPicture modifies contents of pictures array) and a menuSpecial boolean (where the addSpecial method modifies menuSpecial to true of false).
Let me know if there is anything else I can do better!
Thanks so much, Mason!!
@amykarnaze Could you make a commit and push to this repo with the updated changes? Also, make sure to look up PascalCase if you haven't - it is used specifically for names of classes. Well done with the casing for classes and methods.
For your idea about a servedUp method- I think that works well! I may name it isServedUp... that is a convention you may see out there that makes it very easy to tell the purpose of a boolean attribute.
I'm really liking these ideas! Just make a push up to github when you have a sec so I can double check.
I just realized I have been using camelCase. We were using mostly snake_case in class and I was nervous about switching for the assessment and I think I thought camelCase and PascalCase were the same thing, and one being an animal, welp the animal won out..!
I guess I am confused about why we use PascalCase? I reviewed some lectures and feel like they used snake_case or camelCase mostly, but must have missed something. Is it important for naming a class and object? I changed to PascalCase and pushed!
@amykarnaze Great question! Attributes and methods tend to be named in the conventions of the language you are coding in. So since you are learning JavaScript, we are having you use camel case. That may also be why you have seen snake case examples- the back enders use that for Ruby. Class names, however, tend to be in Pascal case across different languages. I can't say 100% all coding languages use that convention, but many do, and it is just a very easy way for developers to recognize something as a class despite whatever syntax or naming conventions are used around it.
@amykarnaze You performed well enough on the assessment to merit a chance to make some changes that can promote you to technical ready. Please make the following updates by EOD Saturday:
[x] Be sure to use pascal case for both class names.
[x] For your glass class, think about if you conceptualize that more as like a drinking glass, or a type of glass. I think you can make this more clear by revising either the class name, or rethinking some attribute names.
[x] Great job naming the isOpen attribute- that is a good convention to use for boolean attributes. But I am wondering if that is an attribute of a menu, or more one of a restaurant. Can you think about something about a menu specifically that would be a boolean? Or maybe you'd track something related to business hours of a different data type.
[x] Here is a key to the variables.txt portion- review to catch any inconsistencies.
Let me know if you have questions about this feedback!