(Solution) 111 Project 5 CIS 111 WEB PROGRAMMING Michael Hennessy, Computer & Information Science, UO CIS 111 Project Web Programming Due 2100 Tue 12/1... | Snapessays.com


(Solution) 111 Project 5 CIS 111 WEB PROGRAMMING Michael Hennessy, Computer & Information Science, UO CIS 111 Project Web Programming Due 2100 Tue 12/1...


I have tried to do #4 of this project (rotate-dice.js and rotate-dice.html), but can't seem to get the JavaScript coding right. The following is what I have so far: //enter strict mode"use strict";var $ = function(idStr){return document.getElementById(idStr);}var rotate = function() {var safe;var rotateLeft = function(n){//check user input if (nn = n % 4//rotate dice n position rightwhile (n>0){safe = $("img1").src;$("img1").src = $("img2").src;$("img2").src = $("img3").src;$("img3").src = $("img4").src;$("img4").src = safe;//decrement n--n;}}else{//user input out-of-range$("meme").src = "images/meme.jpg";$("meme").style.display = "inline";$("cite").innerHTML = "(Thanks, and a tip for next time!)";};};var rotateRight = function(n){//check user input if (nn = n % 4//rotate dice n position rightwhile (n>0) {safe = $("img4").src;$("img4").src = $("img3").src;$("img3").src = $("img2").src;$("img2").src = $("img1").src;$("img1").src = safe;//decrement n--n;};}else{//user input out-of-range$("meme").src = "images/meme.jpg";$("meme").style.display = "inline";$("cite").innerHTML = "(Thanks, and a tip)";}};//a. get user inputvar n = Number($("inBox").value);//b. who you gonna call?if (this.id == "bttn1")rotateLeft(n);else if (this.id == "bttn2")rotateRight(n);else{//reload page when meme is clickedlocation.reload();};};//2. grab the buttonsvar btn1 = $("bttn1");var btn2 = $("bttn2");var outDiv = $("outputDiv");//3.register the handlersbtn1.onclick = btn2.onclick = outDiv.onclick= rotate;This includes the XC down at the end of the pdf. I need help figuring out a) what I did wrong and 2) how to do this right.111

 

Project 5

 

Michael Hennessy, Computer & Information Science, UO CIS 111 WEB PROGRAMMING https://www.coursehero.com/tutors-problems/Business/8939553 8939553 What impact did Benjamin Franklin have on American National Consciousness What impact did Benjamin Franklin have on American National Consciousness https://www.coursehero.com/tutors-problems/Business/8939555 8939555 which of the following is one of the reasons why companies use standard costs? which of the following is one of the reasons why companies use standard costs? https://www.coursehero.com/tutors-problems/Business/8939557 8939557 Two spacecrafts A and B are moving relative to each other at a constant velocity. Observers in spacecraft A see spacecraft B. Likewise, observers in... Two spacecrafts A and B are moving relative to each other at a constant velocity. Observers in spacecraft A see spacecraft B. Likewise, observers in spacecraft B see spacecraft A. Who sees the proper length of either spacecraft?   A. Observers in spacecraft B see the proper length of spacecraft A.   B. Observers in both spacecrafts see the proper length of the other spacecraft.   C. Observers in neither spacecraft see the proper length of the other spacecraft.   D. Observers in spacecraft A see the proper length of spacecraft B. https://www.coursehero.com/tutors-problems/Business/8939559 8939559 the cumulative effect of the declaration and payment of a cash dividend on a company's financial statement is to the cumulative effect of the declaration and payment of a cash dividend on a company's financial statement is to https://www.coursehero.com/tutors-problems/Business/8939561 8939561 How to Teach Internet Safety to Younger Elementary Students Mary Beth Hertz HS Art/Tech Teacher in Philadelphia, PA June 4, 2012 Back in October, I... Can you please summarize these 3 short articles and provide your reflection in few sentences. Each article in different paragraphs.How to Teach Internet Safety to Younger Elementary Students Mary Beth Hertz HS Art/Tech Teacher in Philadelphia, PA June 4, 2012 Back in October, I wrote a post about Teaching Digital Citizenship in the Elementary Classroom . As it is Internet Safety Month , I want to share a sample lesson for teaching internet safety to students as young as kindergarten. Yes, you read correctly . . . kindergarten. With children spending time online at younger and younger ages, it is vital that we explicitly teach young children how to protect themselves online. Most young children get the " Stranger Danger " talk at school, so they know about how to handle strangers in their neighborhood and in face-to-face situations. There are three considerations when addressing Internet safety with these students. First, the transfer of handling strangers in "real life" to those in virtual environments is not automatic. It needs to be taught. Second, while most "Stranger Danger" programs teach that strangers are scary, mean and want to hurt or abduct children, this contradicts the way collaboration occurs between strangers online. Not all strangers are dangerous. Lastly, in "real life," students can walk or run away from a potential threat. In an online environment, the danger is inside a student's home and hard to escape without the necessary skills for handling tough situations. This is a lesson that I have done with my kindergarten and first grade students to introduce the idea that strangers exist on the Internet and to discuss how we should interact with them. Protecting Private Information Online Materials ? Projector ? Computer ? Internet access Introduction (If a projector and/or interactive whiteboard is available, these questions can be projected on a screen during the discussion.) 1. Ask, "What is a stranger?" After soliciting various answers, ensure that students understand that a stranger is someone we don't know. Remind students that some https://www.coursehero.com/tutors-problems/Business/8939565 8939565 putting potatoes under water slows the rate of browning. putting potatoes under water slows the rate of browning. previously submerged potatoes brown at the usual rate once they have been removed from water https://www.coursehero.com/tutors-problems/Business/8939567 8939567 Write a two- to three-page analysis using the Case Study on pages 325-327 of your textbook, "Expatriate Management at AstraZeneca." Your analysis... Write a two- to three-page analysis using the Case Study on pages 325-327 of your textbook, “Expatriate Management at AstraZeneca.” Your analysis should address the following questions: 1. Critically analyze AstraZeneca’s expatriate management practices. 2. According to the 2007 Expatriate Work/Life Balance Survey, 65% of expats report feeling the strain of managing the demands of work and home, leading to more anxieties at home and at the workplace. What steps can an organization take to mitigate this? 3. What decisions related to expatriates could organizations take to maximize the benefits to the company despite ongoing economic recessions? Do you think a company that paid more careful attention to selection could further boost their chances of success? https://www.coursehero.com/tutors-problems/Business/8939569 8939569 coca-cola Amatil conducted a campaign against Australia's adoption of IFRSs in 2004 the company lobbied against requirements that meant COCA COLA coca-cola Amatil conducted a campaign against Australia's adoption of IFRSs  in 2004 the company lobbied against requirements that meant COCA COLA balance sheet value would to be written down by as much as $1.9 billion https://www.coursehero.com/tutors-problems/Business/8939571 8939571 Post the entries to the general ledger. (If you are not using the working papers that accompany this text, you will need to enter the account titles... Post the entries to the general ledger. (If you are not using the working papers that accompany this text, you will need to enter the account titles and account numbers in the general ledger accounts.)The entries April 1-18 have been entered in the journal and posted to ledger as an example.If an amount box does not require an entry, leave it blank. https://www.coursehero.com/tutors-problems/Business/8939573 8939573 In this lab you will write a program to read in and evaluate a postfix arithmetic expression using a stack, as outlined in class. Step 1 . Create a... In this lab you will write a program to read in and evaluate apostfix arithmetic expressionusing a stack, as outlined in class.Step 1. Create a public class Postfix1 inside Postfix1.java and add a main method. Now write a static method to read in a line of text that is purportedly a postfix arithmetic expression from the console (without prompting), and split it into tokens eliminating white space. The tokens should be placed in an array of Strings. At this stage do not verify that this is a genuine expression. Your method is in effect just reading in a line of tokens and placing them in an array no matter what they are. Your method should have the following signature,String[] readExpr()and should return an array whose length is the number of tokens on the line. Now write a method to write the selfsame expression out on one line by itself given the array, with one space between each token. The signature of this method should be as followsvoid writeExpr(String[] expr)Test your methods together to be sure they work.Now write a method to determine if a string is one of the operators + - * permitted in expressions in this lab. Your method should have the following signature.boolean isOperator(String s)Now write a method to check the syntax of a postfix expression represented as an array of Strings. Your method should have the following signature.boolean checkSyntax(String[] expr)and should silently return true if all array entries are either valid operators (tested with the isOperator method) or can be converted to doubles. Otherwise an error message of the form exemplified as follows should be output and false returned. Use writeExpr to output the expression in such a message.1.0 2.0 + 3.2 9.1 / 15 *                  ^Not a number or valid operator.The caret should indicate the first character of the offending token. Write a main method that reads in an expression and runs checkSyntax on it, and if the syntax is correct prints out the expression using writeExpr followed by a second line of "Syntax correct".Step 2.Copy Postfix1.java to Postfix2.java, renaming the public class suitably. Write a (not public) class DoubleStack in Postfix2.java to represent a stack of numbers of type double. You may assume that not more that 1000 numbers will be placed upon a DoubleStack. Your stack should be implemented as discussed at length in class, as an integer indicating how many numbers are currently on the stack, along with an array the initial part of which contains the numbers on the stack. Your stack should implement the usual methods for a stack with the following signatures.DoubleStack() //constructor for a new empty stackboolean empty() //whether the stack is emptydouble pop() //remove and return the top element; throw an error if emptyvoid push(double x) //add x to the top of the stackNow modify the main method in Postfix2.java to read a postfix expression from the console on one line, and if its syntax is incorrect act as in step 1. Otherwise either print out its value on a line by itself, or one of the error messages below as appropriate. Note that the message "Syntax correct" is not wanted in this step. Your new main method should use a DoubleStack along with the machinery you created in step 1 to do this.Specifically, the expression should be evaluated as discussed in class, by iterating through the sequence of numbers and operators; when a number is encountered push it onto the stack and when an operator is encountered, first pop its right operand off the stack, then pop its left operand off the stack, combine these two with the operator, and push the result back on the stack. The result should be a single number on the stack.If an operation is attempted and there are not at least two numbers on the stack to combine then print out a message in the following form.Too few operands for +1.0 2.0 * + 4.3 +          ^The caret should indicate the position of the offending operator inside the entire expression. If the stack contains more than one number when expression evaluation is complete then print out the following message.Too few operators to produce a single result.

 


Solution details:
STATUS
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: May 23, 2022

Solution~00021147601974.zip (25.37 KB)


This attachment is locked

Our expert Writers have done this assignment before, you can reorder for a fresh, original and plagiarism-free copy and it will be redone much faster (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

May 23, 2022

EXPERT

Tutor

ANSWER RATING

GET INSTANT HELP

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • ■ As a reference for in-depth understanding of the subject.
  • ■ As a source of ideas / reasoning for your own research (if properly referenced)
  • ■ For editing and paraphrasing.

This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

Get Free Price Quote