As of Summer, 2016, the Jamba Juice store at the Manoa campus had the following menu (you can click on the image to view it full size):
Each Jamba Juice menu item can be represented as follows:
For the first Jamba Juice assignment, you will create Javascript classes to represent four menu items and use them to define another class called Menu.
Ready? Let’s begin:
Start your timer.
Login to JSFiddle and create a new JSFiddle for your code.
Create a class called “MenuItem”, with a constructor that takes:
Create instances of MenuItem for PapayaSunrise, PeachPerfection, StrawberryDragon, and StrawberryWhirl. Use the console to check that they represent their item correctly.
Create a class called “Menu” which provides access to one or more MenuItem instances. It has:
Create an instance of the Menu class, add the four MenuItem instances to it, and use the findMenuItems() method to find the two MenuItems that are made with mangos.
Press the “save” button to create a URL to refer to your code.
Stop your timer and record your time for this attempt. Be sure to record all your WOD times, because you will need them when you write your technical essay.
Rx: < 21 min Av: 21 - 25 min Sd: 25 - 30 min DNF: 30+ min
Once you’ve finished trying the WOD for the first time, watch me do it.
Note that this video uses an older version of JSFiddle, which did not include the built-in console. Otherwise everything is still the same.
You’ll learn significantly less from watching me solve the WOD if you haven’t attempted the WOD yourself first.
While it’s an achievement to finish the WOD no matter how long it takes, you might experience “diminishing returns” if you work longer than the DNF time. Thus, it is usually strategic to stop working at the DNF time and watch my solution.
After watching my solution, I recommend that you repeat the WOD if you have not achieved at least Av performance. If so, be sure to:
Feel free to keep trying until you make Rx if that’s of interest to you.
By the time and date indicated in Laulima, submit this assignment via Laulima.
Your submission should contain:
A link to the JSFiddle. Make sure you include the complete URL so that I can click on it in my mailer.
The number of times you have attempted this assignment so far, and for each time, how long it took you.
Answer the question: Did you use ChatGPT or GitHub CoPilot to help you with this WOD?
You will receive full credit for this practice WOD as long as you have attempted it at least once and submitted your work on Laulima with all required data before the due date. Your code does not have to run perfectly for you to receive full credit.