Javascript Question

0 comments

  1. Details:
    For this homework, you will use Boolean (conditional) logic in JavaScript to make decisions based on multiple-choice
    data submitted through a form. Your final program must:
  2. take data from at least 4 multiple-choice inputs such as <select> menus
    o IMPORTANT: at least 2 of your multiple-choice inputs must each offer at least 3 options; the rest
  3. must each offer at least 2 options

  • apply conditional (branching) logic to analyze the user’s choices
  • provide at least 2 more result possibilities than inputs (i.e., if you have 4 user inputs, you must have 6 possible
    results; if you have 5 user inputs, you must have 7 possible results; etc.)
    You must not research any new JavaScript functions or structures for this assignment. We want you to focus on the
    complexities of structuring conditional logic, so you should only use the programming structures that we have covered
    in the first three weeks of class and lab. You do not need to write any functions for this project. If you follow the
    instructions in the starter code, you will only add form fields, write code to set variables, make decisions using
    conditional logic, and call function output() to output your final results.
    If you want to do additional formatting on your form, or if you want to offer the user other means of entry besides the
    “select” menu element that we have shown you, you may research additional HTML tags, but doing so will not earn
    you extra credit. We suggest focusing on practicing with the elements that you’ve learned this week and pushing
    yourselves on clear and complex logical structures instead.
    For this project, your grade will be primarily determined by the complexity and clarity of your Boolean logic, and by
    your creativity in producing your quiz or analysis. As always, “originality” and “level of challenge” are parts of the
    grade for this, so come up with something that challenges you to really experiment with code and that won’t be the
    same as everyone el
    • • Update your flowchart (see Flowchart Supplement.pdf for more information!)
      o Make sure that your flowchart matches your code. We recommend that you write the line(s) of code
      that correspond to each box and diamond in your flowchart next to each shape. This will help to
      ensure that you do not break the rule that every box and diamond must represent at least one line of
      code! If you find that you have combined two diamonds into a single line of code, then you need to
      either update your flowchart to reflect that or fix your code so that it matches the flowchart!
    • Prepare your code for submission:
      o Remove or comment out any debugging code, such as extra calls to output() that you added in order
    • to check your work. We should only see the inputs and outputs that are relevant to your project idea!
      o Use the “Beautify” feature in VSCode to make your code neater and easier to read.
      o Make sure that you have written code comments that describe each line of conditional logic in your

      program!
      o Make sure that your project folder is called draft and that it’s inside project2

    • Before the draft deadline, create a reply to your idea posting in the Project 2 Discussion Board that includes:
      o the URL to your uploaded work (as specified above)
      o brief citations for research sources, if you used any (names and pages from books or magazines, links
    • to web site articles or specific entries in online references, etc.)
      o comments on any difficulties that you had with this assignment and/or questions about things that

      you encountered in your research and experimentation that you want to know more about.

      My quiz is about “which transportation is the best choice for you”. The 4 multiple-choice questions in my quiz will be: How much money you want to spend on this transportation? choice 1: 0-$100 choice 2: 100-$1000 choice 3: 1000-$10000 Do you prefer the public transportation or private transportation? How much time do you want to spend on this transportation? choice 1: 0-10 mins choice 2: 10-30mins chocie 3: 30-120minsDo you prefer low-carbon transportation or energy transportationEach question I might have 2-3 different choice and they will get the result which transportation is their best choice.

    About the Author

    Follow me


    {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}