Questions
This is a question on the inputs and outputs on Basic javascript application What is the...

This is a question on the inputs and outputs on Basic javascript application

  1. What is the displayed output of the application if the user inputs

Are: 1    in the first box, 2 in the second box, 3 in the third box, and 4 in the fourth box

Modify the HTML and javascript file in order to

  1. Creates an h1 and a span element

ii)          Accesses all the html elements, then adds the four input values as strings and sends the result

      to the paragraph element and the span element

<!DOCTYPE html>

<html>

<head>

<title> Javascript Example </title>

<script src ="please3_test.js" type ="text/javascript" defer> </script>

</head>

<body>

   <div>

<input id ="num1" type ="text" size ="3"/></br>

<input id ="num2" type ="text" size ="3"/></br>

<input id ="num3" type ="text" size ="3"/></br>

<input id ="num4" type ="text" size ="3"/></br>

<span id ="answer"> Show Output Here</span><br/>

<button id ="btn">Compute </button><br/>

    

</div>

</body>

</html>

please3_test.js

document.getElementById("btn").onclick = compute;

function compute() {

var input1 = document.getElementById("num1");

var input2 = document.getElementById("num2");

var input3 = document.getElementById("num3");

var input4 = document.getElementById("num4");

var answer2 = document.getElementById("answer");

var result = " ";

result= input2.value + input3.value + input4.value;

oddstr = 4;

var finstr = result + oddstr;

answer2.innerHTML = finstr;

result1 = parseInt(input1.value) +parseInt(input2.value) +parseInt(input3.value);

input4.value = result1;

}

In: Computer Science

Draw the diagram (ER / MR / UML) for a database containing the following characteristics: •...

Draw the diagram (ER / MR / UML) for a database containing the following
characteristics:
• Presence sensor that stores presence information with its timestamp and its
location.
• Distance sensor that saves distance information with its timestamp and its
location.
• An actuator of a switch that energizes a bulb, where the record of its
been with your timestamp and your location.
• An actuator of a motor that opens a door, where the record of its
been with your timestamp and your location.
• A device that receives information from sensors and communicates with the
actuators, it can be an Arduino or any other board.

In: Computer Science

Given the HTML below ( do not modify the HTML), Outer paragraph, outer list, div with...

  1. Given the HTML below ( do not modify the HTML), Outer paragraph, outer list, div with 2 inner paragraphs and one inner list , create a CSS which will: a) Make the outer list text color blue , and make the outer (non div) paragraph blue, and the div inner list element pink also inside the div element make the first inner paragraph green, and in the div element the second paragraph blue, so that in order: blue-blue-green-blue-pink b)As a separate case, make the text elements of all the div elements red , except the second div paragraph blue and italic and also make the outer non div paragraph cyan so that in order: cyan-black-red-blue-red C)As a separate case, create css to make all the text elements of the HTML page alternate between blue, Red , green,blue,red ( in that order) D)As another separate case , create css to make the non-div paragraph red, and the div inner paragraphs cyan, so that in order: red-black-cyan-cyan-black

GIVEN HTML

<html>

<head>

      <link rel="stylesheet" type="text/css" href="mystyle98_d.css">

</head>

<body>

             <p>

    I'm a paragraph, what color am I ?

     </p>

   <ul>

     <li id = "fix"> I'm a list item;what color am I? </li>

       </ul>

<div class = "central1">

<p class ="above">

  I'm a paragraph; what color am I?

  </p>

     <p>

    I'm another paragraph, what color am I ?

     </p>

   <ol>

     <li id = "fix1"> I'm another list item;what color am I? </li>

       </ol>

          </div>

</body>

</html>

In: Computer Science

13) Make a program that receives the sex of people like M or F. At the...

13) Make a program that receives the sex of people like M or F. At the end, show how many
is male and female. However, if the user types a letter
different from M or F, the program should ask him to type again. Create a form of
end the program and display the result.

14) Create a program that draws a number between 1 and 10. Right after, the program must ask
for the user to guess the number drawn. When the user is correct, display on the screen according to
times he tried. Obs: SEARCH FOR RANDOM NUMBERS IN PYTHON

15) Receive two numbers from the user and display the menu:
type it
1-Display a sum
2-Display a subtraction
3-Display multiplication
4-Display the division
5-Exit
The user chooses an option, the result of the operation appears on the screen and the menu is to apply
again, until the user chooses an option 5.

16) Ask if the user wants to enter a temperature in Celsius and convert to
Fahrenheit, or from Fahrenheit to Celsius. Receive the value, convert, display the result and
question whether he wants to do another calculation or leave the program. Use as formulas:
(F - 32) × 5/9 = C
(C × 9/5) + 32 = F

17) Receive and check if the user's network number is triangular or not. Repeat one
operation until the user enters a number equal to 0. A triangular number is equal to
sum of first numbers, examples:
6 is a triangular number, because 6 = 1 + 2 + 3
10 is a triangular number, because 10 = 1 + 2 + 3 + 4
15 is a triangular number, because 15 = 1 + 2 + 3 + 4 + 5

18) Given integers n, i and j, all greater than zero, print in ascending order
the natural first n which are multiples of i or j and or both.
For example, for n = 6, i = 2 and j = 3 the output should be: 0 2 3 4 6 8

19) In a gymnastics competition, each athlete receives votes from seven jurors. The best and the
worst score are eliminated. The athlete's score is the average of the remaining votes. You must
make a program that receives the name of the gymnast and the scores of the seven jurors achieved by the
athlete in his presentation. Your program should display an average, as described above
(remove the best and worst jump and then average with the remaining grades). As notes don't
are reported in order. An example of the program output should be as the example
below:
Data entered by the user:
Athlete name: Rone Ilídio
Score: 9.9
Score: 7.5
Score: 9.5
Score: 8.5
Score: 9.0
Score: 8.5
Score: 9.7
Result that should be applied:
Athlete: Rone Ilídio
Best grade: 9.9
Worst grade: 7.5
Average: 9.04

In: Computer Science

Create a simple shopping cart application. Ask the user to input an item number and quantity....

Create a simple shopping cart application. Ask the user to input an item number and quantity. Update the shopping cart. Display the updated cart. Include the following when displaying cart: item number, name, quantity and total price. Ask for another update or end the program.

Design

Requires 2 classes: the main class and the cartItem class In the main class: Need one array named cartArray of type cartItem. Size = ? Need a loop that asks the user for input. Ask for item number, which is a string and quantity which is an integer. Need to create a new cartItem from user input of item number and quantity. Load the cartItem object into the cartArray. (CartItem is a class that takes two values in constructor: item number and item quantity.) Print out all items in cartArray (item number, name, quantity, and total price) and ask user for more input.

CartItem class

CartItem has four instance variables. String itemNumber; String name; int quantity; double totalPrice; It also has a “database” made up of 3 arrays. Described below. The CartItem class has a constructor that takes a String(itemNumber) and an integer(quantity) as arguments. The constructor does the following: It passes the item number up to the corresponding instance variable. It also passes the quantity up to the quantity instance variable. It then calls the getItemName method to first, get the item name and then set the item name instance variable. It calls the calcPrice method to set the totalPrice instance variable by first getting the total price and then setting the totalPrice instance variable.

The CartItem class Has at least the following methods: public double calcPrice(String itemNumber); Returns total price: calculated by multiplying price by quantity. Need to look up the price.Use the item number array to get the index of the item number. Use the item number index to find the price from the price array. Once you have the price you multiply the price by the quantity and return the total. public String getItemName(String itemNumber); returns item name. Use the item number array to get the index of the item number. Use this index to find the name of the corresponding item. Return the name. public void setItemName(String name); sets name instance variable. public String toString() returns the string values of all the variables. Array description The first is of type String that holds the item numbers. Example: {“101a”, “ 201b”, “301c”} The second array is of type String and it holds the item name. Example: {“Flashlight”, ”scissors”, “Book mark”}; Third array is of type double that has the corresponding prices: {12.99, 4.55, 1.99};

In: Computer Science

q: Given the following HTML for a table, put all these questions into one application (use...

q: Given the following HTML for a table, put all these questions into one application (use css)

a)   Modify the html to create another column called Assessment, and then modify the html to
extend the data in the rows ( you may use arbitrary numbers for the data items in the td elements)
b)   Make all table text elements blue using either css or html modification
c)   Make the background color of the columns alternate between pink and yellow,
<!DOCTYPE html>
<html>


<head>
<title>TABLE with STYLE SHEET</title>
<meta charset="utf-8" />
<meta name="description" content="How to form a table and apply styling." />
<link href="table1.css" type="text/css" rel="stylesheet" />
</head>

<body>
<table border = "1">
<col class ="product" />
<colgroup class = "facts">
<col/> <col/> <col class = "fat" />
</colgroup>
<tr>
<th> Product </th>
<th> Size (oz) </th>
<th> Caffeine (mg) </th>
<th> Fat (g) </th>

</tr>
<tr> <td> Green Tea </td> <td>8</td><td>20 </td> <td>0 </td></tr>
<tr> <td> Dark Chocolate </td> <td>2</td><td>20 </td> <td>19 </td></tr>
</table>

</body>
</html>

In: Computer Science

C# Discussion questions. Describe the major reasons to create a method. Explain the reason for using...

C# Discussion questions.

  • Describe the major reasons to create a method.
  • Explain the reason for using fully qualified method names
  • Define the scope of a variable
  • Explain how to pass multidimensional and jagged arrays as parameters.
  • What do you think are the advantages of using methods in your programs? Is it possible to write a complete large-scale program without methods?
  • What is the difference between reference parameters and output parameters? When should you use each?

In: Computer Science

What issues must be addressed when building an e-commerce presence? How has e-commerce affected business-to-business transactions?...

What issues must be addressed when building an e-commerce presence? How has e-commerce affected business-to-business transactions?

Looking for original content!

In: Computer Science

Given the html below, create css to produce the following illustrated color page output: Red for...

  1. Given the html below, create css to produce the following illustrated color page output:

Red for outer paragraph and outer list

Green and italic for first inner div paragraph, green for second div paragraph, blue for inner list

HTML File

<html>

<head>

      <link rel="stylesheet" type="text/css" href="mystyle98_d.css">

</head>

<body>

             <p>

    I'm a paragraph, what color am I ?

     </p>

   <ul>

     <li id = "fix"> I'm a list item;what color am I? </li>

       </ul>

<div class = "central1">

<p class ="above">

  I'm a paragraph; what color am I?

  </p>

     <p>

    I'm another paragraph, what color am I ?

     </p>

   <ol>

     <li id = "fix1"> I'm another list item;what color am I? </li>

       </ol>

          </div>

</body>

</html>

In: Computer Science

Java program problem 1 Come up with an idea for parallel arrays Create the arrays to...

Java program

problem 1

  • Come up with an idea for parallel arrays
  • Create the arrays to hold 5 items in each
  • In the main(), load the arrays with data
  • Then output the entire contents of the arrays
  • Create a method called find1() and pass the 2 arrays to that method.

problem 2

  • In the find1() method, ask the user to enter a value to search for
  • Write logic to search the first array and then output the related data from the second array.
  • You can NOT use the .binarySearch() method. Create your own search logic.
  • The find1() method should return a TRUE if a match was found and FALSE if no match was found
    • Be sure to comment your code

In: Computer Science

The user is going to cin a whole bunch of regular text. You store each word...

The user is going to cin a whole bunch of regular text. You store each word based on its first letter. Print out all the words they used by letter. Strip all punctuation and uncapitalize everything. :

- Project set up with stl includes, correct files, and turned in correctly. (Zipped project with no inner debug folder.)

- Basic data structure made. This requires at least two connected containers. More is okay if it makes sense to you, but no way this works with just one. Be sure to comment how it works so I understand it.

- Program planned out in English in inline comments in main. Think of it as you could read this to a programmer and they could do your homework for you. No code details belong in an outline; the person you are reading it to might not use C++. Fell free to mutter to yourself. You need someone else to understand what to do. But do not just comment every line; they know how to write in whatever language they choose. Don't forget - you can use any resource here short of other people and copying code of the internet. But if you can't remember how to use cin to pull words off a sentence, look it up. In the first page of search results I see three different ways to do it. No I'm not saying what they are.

- Parsing sentence down to words works

- Putting in your data structure works

- Removing punctuation and capital letters

Input: I asked my doctor how long I had to live. She said five. I said "Five what?" She said four...

Output: A asked B C D doctor E F five five four G H how had I I I I J K L long live M my N O P Q R S she said said she said T to U V W what X Y Z

In: Computer Science

In C++, type a function function(int n, int base) that converts a positive integer x to...

In C++, type a function function(int n, int base) that converts a positive integer x to any base between 2 and 9. The function HAS to do this using a stack, and using methods from below:

+isEmpty(): boolean

+push(newEntry: ItemType): boolean

+pop(): boolean

+peek(): ItemType

(Also, type a program to test the function).

Hint: could use simple iteration continually divides the decimal number by base and keeps track of the remainder by using a stack.

In: Computer Science

WRITE IN C++ Add to the Coord class Edit the provided code in C++ Write a...

WRITE IN C++

Add to the Coord class

Edit the provided code in C++

Write a member function named

     int distance2origin()

that calculates the distance from the (x, y, z) point to the origin (0, 0, 0)

the ‘prototype’ in the class definition will be

     int distance2origin()

outside the class definition

            int Coord :: distance2origin()

{

                        // your code

}

_______________________________________________________________________________________________________

/**************************************************
*
*      program name:       Coord02
*      Author:             
*      date due:           10/19/20
*      remarks:
*
*
***************************************************/

/******************************************
*     library includes
******************************************/
#include            // needed for cin and cout

/******************************************
*     pre-processor
******************************************/
#define PI 3.14159
using namespace std;

class Coord {
private:
    int xCoord;
    int yCoord;
    int zCoord;

public:
    Coord(int xCoord, int yCoord, int zCoord){
        this->xCoord=xCoord;
        this->yCoord=yCoord;
        this->zCoord=zCoord;
    }

    inline void setXCoord(int xCoord){
        this->xCoord=xCoord;
    }
    inline void setYCoord(int yCoord){
        this->yCoord=yCoord;
    }
    inline void setZCood(int zCoord){
        this->zCoord=zCoord;
    }
    inline int getXCoord(){
        return this->xCoord;
    }
    inline int getYCoord(){
        return this-> yCoord;
    }
    inline int getZCoord(){
        return this->zCoord;
    }

    void display(){
        cout<xCoord<yCoord<zCoord<

Please Explain Everything in detail. Thank you.

In: Computer Science

DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM Exercise called: Number Analysis Program Design a program that...

DESIGN A FLOWCHART IN THE APPLICATION FLOWGORITHM

Exercise called: Number Analysis Program

Design a program that asks the user to enter a maximum of 20 numbers. The program should store the numbers in an array and then display the following data:

1-The lowest number in the array.

2-The highest number in the array.

3-The total of the numbers in the array.

4-The average of the numbers in the array.

PLEASE AND THANK YOU

In: Computer Science

Look at the HTML below ( do NOT modify the HTML), Outer paragraph, outer list, div...

Look at the HTML below ( do NOT modify the HTML),

Outer paragraph, outer list, div with 2 inner paragraphs and one inner list ,

create a CSS which will:

  1. Make the outer list text color blue , and make the outer (non div) paragraph blue, and the div inner list element pink also inside the div element make the first inner paragraph green, and in the div element the second paragraph blue, so that in order: blue-blue-green-blue-pink
  2. As a separate case, make the text elements of all the div elements red , except the second div paragraph blue and italic and also make the outer non div paragraph cyan so that in order: cyan-black-red-blue-red
  3. As a separate case, create css to make all the text elements of the HTML page alternate between blue,

Red , green,blue,red ( in that order)

  1. As another separate case , create css to make the non-div paragraph red, and the div inner paragraphs cyan, so that in order: red-black-cyan-cyan-black

<html>

<head>

      <link rel="stylesheet" type="text/css" href="mystyle98_d.css">

</head>

<body>

             <p>

    I'm a paragraph, what color am I ?

     </p>

   <ul>

     <li id = "fix"> I'm a list item;what color am I? </li>

       </ul>

<div class = "central1">

<p class ="above">

I'm a paragraph; what color am I?

</p>

     <p>

    I'm another paragraph, what color am I ?

     </p>

   <ol>

     <li id = "fix1"> I'm another list item;what color am I? </li>

       </ol>

          </div>

</body>

</html>

In: Computer Science