Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
Need help with this. I attached how it should look
- Declare the questionList variable, storing in it the node list created by the querySelectorAll() method using “div#quiz input” as the CSS selector.
- Add an onclickevent handler to the startQuiz object, running an anonymous function that sets the class attribute of the overlay object to “showquiz” and repeats the countdown() function every 1 second (every 1000 milliseconds), storing the id of the timed command in the global timeID variable you declared in Step 3.
- Create the countdown()function to update the quiz clock. Within the function create an if else statement that tests whether the value of the timeLeft variable is equal to 0. If it is equal to 0, do the following: 0. Use the clearInterval()method to cancel the timed command with the variable timeID.
- Declare a variable named totalCorrect and set it equal to the value returned by the checkAnswers()
- If totalCorrect is equal to the length of the correctAnswers array then display an alert window congratulating the student on getting 100%, otherwise do the following:
- Display an alert window indicating the number of incorrect answers out of the total number of questions on the quiz,
-
-
-
- change the value of the timeLeft variable to quizTime,
- set quizClock.value to the value of the timeLeft variable, and
- change the class attribute of the overlay object to “hidequiz”.
-
-
- Otherwise, if the timeLeft variable is not equal 0, then:
- Decrease the value of timeLeft by 1.
- Set quickClock.value to the value of the timeLeft variable.
- Run the quiz within the allotted time. Verify that the clock counts down the time remaining every second. At the end of the time limit, confirm that the quiz catches your mistakes and reports the number of correct answers out of the total number of questions. Verify that when you get all the answers correct, a congratulatory message is given.
- Increase the value of the timeLimitvariable to 90 and close the file, saving your changes
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 5 steps with 1 images
Knowledge Booster
Similar questions
- Thank you very much for your help. I do need the btnSubmitPrice to work when clicked though, and via the assignment given, I cannot have an InputBox unless I am also allowed to have the btnSubmitPrice to be clicked when a user adds another item. When a user adds another item, the txtTotalSales and txtAverageSalePrice have to change as well and update with the new values. I do not know how to do this. I tried moving the text under btnSubmitPrice_Click instead of FrmMain_Load and it did not work.arrow_forwardUpdate it to create a class Student that includes four properties: an id (type Integer), a name (type String), a Major (type String) and a Grade (type Double). Use class Student to create objects (using buttonAdd) that will be read from the TextFields then save it into an ArrayList. Perform the following queries on the ArrayList of Student objects and show the results on the listViewStudents (Hint: add buttons as needed): d) Use lambdas and streams to calculate the total average of all Students grades, then show the result. 1. Ch3HW; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; public class MainApp extends Application{ @Override publicvoidstart(StageprimaryStage) throwsException { FXMLLoader loader =newFXMLLoader(getClass().getResource("StudentScreen.fxml")); Parent parent = loader.load(); Scene scene =newScene(parent);…arrow_forwardCreate a vector x which ranges in values from -180 to 180 in steps of 10. Then let y = x. These values are in degrees. Find a variable z = cosd(x)’*sind(y); Use surf to plot the surface plot, and label using commands xlabel, ylabel, and zlabel. Add a title.arrow_forward
- Create an Empty Activity Project to implement the following Layouts. Layouts: one Text, one E-mail, one Image and one Button. Tips: - The project’s layout structure is ConstraintLayout. - The first element is Text. You must write your name in place of “XYZ” with a textSize = 20sp and textColor of Red. - The second element is E-mail. You must write your email address under your name, with the textColor = Blue. - The third element is an image. You can add any image after your name and email with any size you like. - The fourth element is a button. Place the button on the end of the page and call it ”OK”. Implement the previous requirements and include the XML file and screenshot of the layout’s output, after you run the application. Layout’s output:arrow_forwardThe Add-Computer command has how many parameter sets? Within those parameters are there any that are positional? If there are positional parameters, please list them. Does this command run? Get-EventLog Application 0,1 -newest Why does it, or does it not?arrow_forwardI'm working on an assignment and i'm trying to create a to-do list in AndroidStudio. I've created the listview, edit text, switch and button, but I've hit a snag with the following: Create a new Java object to hold each todo item, it should contain a string with the text of the todo, and a boolean for if it is urgent or not. Create a List to hold all your items, and for the adapter to use for displaying them. When you click “Add”, you should create a new todo item and add it to the list, clear out the text in the EditText, and call “notifyDatasetChanged()” on your adapter so it refreshes. Implement a BaseAdapter to power the ListView. In AndroidStudio, type ctrl + O (the letter ‘O’, not number zero). From the list of inherited functions, implement these ones: int getCount() - This returns the number of rows that will be in your listView. In your case, it should be the number of strings in the array list object ( return list.size() ). Object getItem(int position) – This…arrow_forward
- What would be the missing codearrow_forwardPlease explain how to get the genre list to filter and how to associate the i to the title of the movie and display it on the finish screen. You can press to view code on the top right of the screen and you can edit it by creating a remix. Thank you for you help it is due today at 12. var nameList = getColumn("Netflix Content", "Title");var typeList = getColumn("Netflix Content", "Type");var typeSelection;onEvent("typeDropdown", "click", function( ) {typeSelection = getText("typeDropdown");});onEvent("startButton", "click", function( ) {setScreen("typeScreen");console.log("in STARTBUTTON typeSelection = "+typeSelection);});onEvent("toRatingButton", "click", function( ) {setScreen("finishScreen");console.log("typeSelection = "+typeSelection);// for (var i = 0; i < nameList.length; i++) {for (var i = 0; i < 25; i++) {console.log(((" i="+i)+" "+typeSelection)+" "+ratingSelection+" "+genreSelection+"--"+typeList[i]+" "+ratingList[i]+" "+genreList[i]);// if ((typeList[i] ==…arrow_forwardPlease fix these in the above splution, it is not fully correct. "You're invited" needs to be formatted correctly. With a larger font, using BS classes only. Use Bootstrap classes to make a circular image with a border - around the image only. "Don't tell the cats" color should be set with BS classes.arrow_forward
- Please Help with Java Script eventListeners 1. Add an event listener to the button with an id of "button1". Listen for the click event. The button should change the text content of the paragraph with an id of "p1" to:"Hello World! I'm listening to events." This did NOT work://const button1 = document.querySelector("button1");//const p1 = document.querySelector("p1");//const click = () => {// alert("Hello World! I'm Listening to events.");//} //button1.addEventListener("click", p1, false); This did NOT workconst button1 = document.querySelector("button1");const p1 = button1.querySelector("p1");button1.addEventListener("click", function (event) {event.p1.target.textContent = "Hello World! I'm Listing to events.";}); 2) Add an event listener to the button with an idof "button2". Listen for the click event. Thebutton should change the text content of theparagraph with an id of "p2" to:"This button toggles text content."If the button is clicked a 2nd time,the text content should change…arrow_forwardPLEASE ENSURE TO USE THE FRAMEWORK PROVIDED IN THE IMAGES, AND THAT IT WORKS WITH THE TESTER CLASS. Write a class RangeInput that allows users to enter a value within a range of values that is provided in the constructor. An example would be a temperature control switch in a car that allows inputs between 60 and 80 degrees Fahrenheit. The input control has “up” and “down” buttons. Provide up and down methods to change the current value. The initial value is the midpoint between the limits. As with the preceding exercises, use Math.min and Math.max to limit the value. Write a sample program that simulates clicks on controls for the passenger and driver seats.arrow_forwardUsing DrawingPanel.java (from chapter 3G), draw a grid for filling in a 4 x 4 square of cell containing integers. For this part of the assignment the values are not important, but you are welcome to use the values shown in the magic square from below. Note that the values in any horizontal row, vertical column or main diagonals add up to 34, in addition to various sub-squares in the larger square also add up to the same value. Requirements: The magic square should be centered in the panel The values in each of the cells should be centered in that cell (both horizontally and vertically). You can assume the values will be <= 99 (i.e., at most 2 digits). For this part of the assignment, you can hard-code the values; you will store them in a 2-dimensional array (from chapter 7) when implementing Part B of the assignment. The title "CSC 142 Magic Square" is centered horizontally in the panel and at y = 50 You are free to choose the colors, fonts, font sizes and effects. This is what I used…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY
Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON
Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY