Reference no: EM131149261
Programming Exercise
1. Write JavaScript statements to accomplish each of the following tasks:
a) Display the value of the seventh element of array f.
b) Initialize each of the five elements of one-dimensional array g to 8.
c) Total the elements of array c, which contains 100 numeric elements.
d) Copy 11-element array a into the first portion of array b, which contains 34 elements.
e) Determine and print the smallest and largest values contained in 99-element floating point array w.
2. Use a one-dimensional array to solve the following problem: A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a salesperson who grosses $5000 in sales in a week receives $200 plus 9 percent of $5000, or a total of $650. Write a script (using an array of counters) that obtains the gross sales for each employee through an HTML5 form and determines how many of the salespeople earned salaries in each of the following ranges (assume that each salesperson's salary is truncated to an integer amount):
a) $200-299
b) $300-399
c) $400-499
d) $500-599
e) $600-699
f) $700-799
g) $800-899
h) $900-999
i) $1000 and over
3. Write a script that inputs several lines of text and a search character and uses String method indexOf to determine the number of occurrences of the character in the text.
4. Write a script based on the program in Exercise 11.13 that inputs several lines of text and uses String method indexOf to determine the total number of occurrences of each letter of the alphabet in the text. Uppercase and lowercase letters should be counted together. Store the totals for each letter in an array, and print the values in tabular format in an HTML5 textarea after the totals have been determined.
Write a css rule that changes the color of all elements
: Write a CSS rule that changes the color of all elements containing attribute class = "green-Move" to green and shifts them down 25 pixels and right 15 pixels.
|
What kind of working conditions will you have
: Consider your ultimate career goal.- What kind of working conditions will you have?- Does your future career have a union?
|
What obstacles has this person encountered as a leader
: In what ways is this person a leader? In what ways is this person a manager? What different leadership roles and functions does this person fulfill? How are these roles similar? How are they different?
|
Is the climate a social issue
: Is the climate a social issue? Some say that the climate is warming, that man is causing it, that the science on the matter is settled, and that the results will be catastrophic if we don't make radical global interventions. Do you think the sci..
|
Write a script that inputs several lines of text
: Write a script that inputs several lines of text and a search character and uses String method indexOf to determine the number of occurrences of the character in the text.
|
Prepare a research paper on feminist or care ethics
: repare a three-page research paper on feminist/care ethics and do the following: - Define feminist/care ethics.- Provide a brief history on the subject.
|
What is the fund net asset value
: The Capitalist Mutual Fund's portfolio is valued at $48 million. The fund has liabilities of $4 million, and the investment company sponsoring the fund has issued 1,600,000 shares. What is the fund's net asset value
|
What is the grammar and sentence structure like
: Consider what you read in the Unit III lecture concerning exegesis. Take into consideration every element that might affect how you interpret the piece of text for your art. What is your cultural lens through which you are reading the text? (Think..
|
Should the behavior be fixed
: Choose a deviant behavior (based on society and not religion) and research it online. Discuss this behavior using Strain Theory, Cultural Transmission Theory, or Differential Association Theory. Should the behavior be "fixed?" Why, or why not?
|