Part 2: Edit copy lab06.html, lab06.js and lab06.css to lab06.html, lab06.css, and lab06.js. In your html file, create 6 buttons with the names Problem 1, Problem 2, ..., Problem 6. Then, implement all 6 flowcharts in your lab06.js. When each button is clicked, the event handler should execute the corresponding algorithm in your js file. Note that you will have to implement several functions that require multiple inputs (e.g. 12, 2, -3, 6, -11, -3, 1, -1). In these cases, accept as input a comma delimited string (i.e. "12, 2, -3, 6, -11, -3, 1, -1"). Then, break the comma delimited string into a series of integers for processing with your algorithm. You may want to research the 'split' method for strings in Javascript to learn how to break a string apart into many pieces. Ex 5) This exercise uses sub-algorithms. Trace the algorithm when input value is 4 and complete the trace tables. Also note that there are two variables named num. One is in the main algorithm and another is the sub-algorithm. Write pre- post-conditions for each of these algorithms (the main one and the sub-algorithm). num output start num prime(num) start num flag d returned value 14-2 is num i+i+1 T prime()=true flag-true d2 flag=true and dsnum/2 num mod d = 0 flag false dd+1 end ret flag
Part 2: Edit copy lab06.html, lab06.js and lab06.css to lab06.html, lab06.css, and lab06.js. In your html file, create 6 buttons with the names Problem 1, Problem 2, ..., Problem 6. Then, implement all 6 flowcharts in your lab06.js. When each button is clicked, the event handler should execute the corresponding algorithm in your js file. Note that you will have to implement several functions that require multiple inputs (e.g. 12, 2, -3, 6, -11, -3, 1, -1). In these cases, accept as input a comma delimited string (i.e. "12, 2, -3, 6, -11, -3, 1, -1"). Then, break the comma delimited string into a series of integers for processing with your algorithm. You may want to research the 'split' method for strings in Javascript to learn how to break a string apart into many pieces. Ex 5) This exercise uses sub-algorithms. Trace the algorithm when input value is 4 and complete the trace tables. Also note that there are two variables named num. One is in the main algorithm and another is the sub-algorithm. Write pre- post-conditions for each of these algorithms (the main one and the sub-algorithm). num output start num prime(num) start num flag d returned value 14-2 is num i+i+1 T prime()=true flag-true d2 flag=true and dsnum/2 num mod d = 0 flag false dd+1 end ret flag
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Please help me with this question. I am not understanding what to do. Please complete part 2 for the question. I am extremely confused
(You do not need to do the contents of ex 5 Just need the part 2 for the question)
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education